Html2pdf.convert not functioning in lambda

Product: pdftron/pdfnet-node

Product Version: 9.0.0-3

Lmabda ENV: Node JS 14 - 2.880.0 JS SDK - Amazon Linux 2 OS
Linux kernel – 4.14.165-102.205.amzn2.x86_64

Please give a brief summary of your issue: The HTML to PDF conversion works locally in demo mode. It is not working in lambda in demo mode or with a license.

Please describe your issue and provide steps to reproduce it:
The following code block takes data from a microsoft graph api email and converts email data to a PDF document. Locally on MAC OS 10.15.7 it works in demo mode. In my lambda environment it simply does not work. There are no errors thrown. The code is parsed but the const emailBodyDoc ends up with a 0 page count after conversion. I have tired this with the license and in demo mode in lambda and have gotten the same results.

try {
const html = `

From: ${parsed.from?.html}
To: ${}
Subject: ${parsed.subject}


const html2pdfSettings = await PDFNet.HTML2PDF.WebPageSettings.create();
const html2pdf = await PDFNet.HTML2PDF.create();
const emailBodyDoc = await PDFNet.PDFDoc.create();


await html2pdf.insertFromHtmlString2(html, html2pdfSettings);
await html2pdf.convert(emailBodyDoc);
pageCount = await emailBodyDoc.getPageCount();
await resultDoc.insertPages(1, emailBodyDoc, 1, pageCount, PDFNet.PDFDoc.InsertFlag.e_none);
} catch (err) {

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Thank you for the detailed report. Most likely a dependency is missing.

Please try this version of the module specifically build to Amazon Linux 2.