HTML to PDF
Turn a saved web page, an email or any HTML file into a PDF, printed as Chrome prints it.
Drop HTML files here
Needs our servers. You confirm before anything is uploaded.
Deleted 60 minutes after you download it.
Keep a receipt, an order confirmation, a newsletter or an article as a PDF with its layout, fonts and colours in place. FormatJet prints the HTML file in Chrome on our servers with the network closed, so nothing on the page loads from the web unless you allow it, and deletes the upload as soon as the PDF is ready.
About the formats
HTMLHTML web page
HTML is the markup language of web pages: text with tags for headings, links, lists, tables and images. A saved web page is an HTML file.
PDFPDF document
PDF is the standard format for documents that should look the same everywhere. It can hold text, images and vector graphics across many pages.
Converted with Web page to PDF (Browser Run).
Questions
Why does my saved page come out without its pictures or styles?
A page saved as “HTML only” keeps just its text and tags, and even a complete save keeps its pictures and styles in a folder beside the file. Only the HTML file is uploaded, so those files are missing. FormatJet warns you before uploading when a page points to files saved next to it. Pictures embedded in the file itself are kept.
Do scripts on the page run?
Yes, in a browser on our servers, so charts and tables that a script draws are printed. Scripts get a few seconds to finish, and a page that never stops changing is printed as it stands at that moment. They can’t reach the internet unless you turn on loading from the web.
What does “Load images, styles and fonts from the web” do?
It lets the page fetch the pictures, styles and fonts it links to on other websites, over HTTPS only, as an email does when you show its images. It’s off by default, so tracking pixels and analytics in a saved page or email never load. Files saved beside the page still can’t load, because only the page is uploaded.
Which page size does the PDF use?
A4 unless you choose Letter, in portrait or landscape, with the margin you set. A page that sets its own print size with CSS (@page) keeps it, as it does when Chrome prints it. Background colours and images are printed unless you turn them off.
Do links still work in the PDF?
Yes. Links stay clickable, headings become the PDF’s bookmarks, and the text stays selectable and searchable. The PDF is tagged, so screen readers can follow its headings and reading order.
HTML to PDF with the API
Convert from your code with one request. See the HTML to PDF API
curl "https://api.formatjet.com/v1/convert?conversion=html-to-pdf" \
-H "Authorization: Bearer $FORMATJET_API_KEY" \
-F file=@input.html \
-o output.pdf