Skip to main content

HTML to PDF Feature Released

· One min read
James A Brannan
Developer Evangelist

We here at the DynamicPDF API are excited to announce that the DynamicPDF API can now convert HTML to PDF. With the addition of a new input type to the pdf endpoint, you can easily convert HTML pages to PDF documents. And you can specify raw HTML or a file path in your local storage system or in the DynamicPDF Cloud Storage. And we updated all client libraries to support HTML conversion. The HTML input type can also be mixed with other input types such as PDF, image, DLEX and page to create PDF documents with pages from multiple sources.

The following instructions.json illustrates converting a raw HTML string and an HTML file to a PDF, and then merging the two into a combined PDF document.

{
"$ref": "https://www.dynamicpdf.com/schemas/pdf.instructions.schema.json",
"author": "John Doe",
"title": "My Html Pages Converted to PDF",
"inputs": [
{
"type": "html",
"htmlString":"<html><p>This is a cover page.</p></html>"
},
{
"type": "html",
"resourceName": "myPage.html"
}
]
}

Be certain to check our documentation's tutorials section, as we will be adding a tutorial covering HTML to PDF conversion (if it hasn't been added already).

Stay tuned for updates and more information.