T

How to Convert HTML to PDF (Chrome Print, Then We Delete the File)

September 15, 2026 · 2 min read

By Amin Mahmoud · operator of techyworks · LinkedIn

Try the tool now →

Browser “print to PDF” is fine when you already have the page open. It is awkward when you have a saved .html invoice, an email template, or markup from another tool and you just want a file. techyworks takes that HTML, prints it with headless Chrome (WeasyPrint if Chrome is missing), returns the PDF, and deletes the temp folder. We do not offer “enter a URL” on purpose: fetching arbitrary websites from the server is a classic SSRF hole.

What you should paste (and what will look wrong)

Self-contained HTML works: a <style> block, tables, and images as data URIs. External stylesheets and images on other hosts often fail because the converter is not allowed to make outbound network requests. JavaScript is stripped (<script> tags and inline handlers) before print — a live React app will not hydrate on the server. If your “page” is an app shell, export static HTML first.

Page size is A4 or Letter; you can request landscape. That matches office paper, not an infinite phone scroll. Long articles become multiple pages. If a wide table is clipped, switch to landscape or shrink the table in the HTML before converting.

Step-by-step

  1. Open HTML to PDF.
  2. Upload a .html / .htm file or paste markup in the second tab. Empty both fields returns an error — the API requires one of them.
  3. Pick A4 or Letter and landscape if the layout is wide.
  4. Convert and download. The server copy is gone after the response.

Limits that are real, not folklore

  • Upload cap is 2 MB for the file. Pasted HTML is capped around 1.5 million characters. Oversized marketing pages need trimming.
  • About 10 conversions per minute per IP (same throttle pattern as our other server tools).
  • If Chrome cannot print, the job fails rather than silently uploading your HTML to a third-party SaaS. Check that the markup is valid UTF-8 and that you did not paste a binary by mistake.

Related jobs

Need a PDF from Word instead? Use Word to PDF (that one stays in the browser). Need to edit the PDF after print? Edit PDF. HTML to PDF is for freezing markup you already trust, not for turning a live website into an archive.

Convert HTML to PDF free.