Convert HTML to PDF using IronPDF
To convert an HTML file to a PDF document, you can use the fromHtml method provided by the IronPDF library from Iron Software. The resulting PDF will include the complete content from your HTML file.
import {PdfDocument} from "@ironsoftware/ironpdf";
(async () => {
// Render the HTML file
const pdf = await PdfDocument.fromHtml("example.html");
// Export the PDF document
await pdf.saveAs("output.pdf");
})();To convert an HTML file to a PDF document, you can use the fromHtml method provided by the IronPDF library from Iron Software. The resulting PDF will include the complete content from your HTML file.
Version:2026.8just released