Skip to content

HTML to PDF

Step 1 of 4

Premium

Choose HTML, HTM file

or drop it here

HTML, HTM · up to 15 MB · processed on our servers, deleted within 1 hour

HTML to PDF — online tool, included with Pro

Convert an HTML file into a PDF — an invoice template, an exported email, a report generated by a script, or a saved web page you need to archive with its layout intact. Upload the .html or .htm file and the page is rendered by a real browser engine, including its CSS, then paginated into a PDF. This conversion runs on our servers, so it needs a signed-in account with an active plan; your file is processed once, and the converted file is kept for up to an hour so you can download it, then deleted automatically. Styles embedded in the file or linked from the web are applied; local image and stylesheet files referenced by relative path are not available to the renderer.

HTML to PDF runs on our secure servers and is included with a CraftMyDocs Pro plan. Uploaded files are deleted automatically after processing.

  • Rendered by a headless browser, so CSS layout, web fonts and flexbox/grid behave as in Chrome
  • Print stylesheets (@media print) and page-break rules are honoured
  • Links in the HTML remain clickable in the PDF
  • Ideal for templated documents generated by code — invoices, statements, reports
  • Server-side processing with automatic deletion afterwards

How to html to pdf

  1. 1Save the page as a single .html file. Inline your CSS or link it from a public URL so it is available to the renderer.
  2. 2Sign in with an account that has an active plan and upload the file.
  3. 3Click Convert to PDF and wait for the render to finish.
  4. 4Download the PDF.
  5. 5If the page breaks awkwardly, add CSS page-break rules (break-before, break-inside: avoid) and convert again.

Frequently asked questions

Can I convert a live URL instead of a file?

Not in this version — upload the saved HTML file. In most browsers, Save Page As → Webpage, Complete produces the file; for the cleanest result choose Webpage, HTML only and make sure stylesheets and images are referenced by absolute https URLs.

Why are my images missing in the PDF?

Images referenced by a relative path (images/logo.png) point at files that were not uploaded. Either reference them by absolute public URL or embed them as base64 data URIs inside the HTML. Images already hosted online render normally.

How do I control page size and margins?

Use a CSS @page rule in the HTML — for example @page { size: A4; margin: 20mm; } — and the renderer applies it. Without one, the default is a letter-size page with standard margins.

Does JavaScript run before the page is captured?

Scripts in the file execute and the page is captured once it has loaded, so content built by inline JavaScript is included. Content that arrives from external APIs the renderer cannot reach will not appear.

Need more than HTML to PDF?

Explore 20+ PDF tools, or build an ATS-ready resume with AI.