There are two quite different jobs hiding behind "HTML to PDF". One is turning HTML you have yourself (an exported report, an email template, a receipt your app generates) into a PDF. The other is keeping a copy of a page on someone else's website.
For the first job, the HTML to PDF tool on EddiesPDF works well. For the second, it works for some sites and not most, because of a browser security rule rather than anything you're doing wrong. Your browser's own Print > Save as PDF is often the quicker route there.
Converting HTML with EddiesPDF
- Open HTML to PDF and pick a tab: "Upload HTML file" (an .html, .htm or .xhtml file), "HTML code" (paste or type it in), or "Web addresses" (one per line).
- Open "More options" if you want to change the page size or margin.
- Click "Convert to PDF" and download the result.
Each web address becomes its own PDF, and several download together as a ZIP. Whichever tab you use, the HTML is laid out and converted inside your browser tab. Nothing is uploaded to our server.
Why so many websites won't load
When you type an address into the "Web addresses" box, your browser fetches that page on behalf of eddiespdf.com. A script on one site is only allowed to read a response from another site if that other site explicitly says it's fine, by sending a header called Access-Control-Allow-Origin. That's the CORS rule, and it exists so that a random page you visit can't quietly read your webmail or your bank's pages in the background.
Most websites don't send that header for ordinary pages. So for most addresses the browser blocks the request before the tool ever sees the page, and you get this message:
There's no way round this from inside a web page, and we don't route requests through a server of ours to dodge it (that would mean your browsing going through us, which the tool is built to avoid). The pages that do load come from sites that deliberately allow cross-site reads.
Two smaller details. If one of several addresses is blocked, the whole run stops, so remove it and try again. And pages are fetched without your cookies, so you get what a logged-out visitor sees.
The workarounds that actually work
For a page on someone else's site, your browser's print dialog is usually the best tool. It renders the page exactly as you're seeing it, logged in, with scripts run and pictures loaded.
- Chrome and Edge on a computer: press Ctrl+P (Cmd+P on a Mac) and set Destination to "Save as PDF".
- Firefox: Ctrl+P, then choose "Save to PDF" as the printer.
- Safari on a Mac: File > Export as PDF.
- Chrome on Android: open the menu, choose Share, then Print, and pick Save as PDF.
If the page is cluttered with menus and adverts, print it from the browser's reader view instead.
The other workaround the error suggests, saving the page as an .html file and uploading it, is fine for simple pages. On a modern site it tends to disappoint, because the saved file points to its stylesheets and images by relative paths (things like images/photo.jpg), and an uploaded file has no website around it for those paths to resolve against. You get the text with little or no styling, so I'd only use it for pages that are mostly text.
What happens to your HTML during conversion
The tool loads your HTML into a hidden frame and removes anything that could run code: scripts, embedded frames, plugins and inline event handlers. Then it lays the page out and captures it, page by page, as an image, and puts an invisible text layer on top so you can still select, search and copy the text.
That has consequences:
- Content that a script would have added never appears. If a page builds itself with JavaScript, the PDF may be nearly empty. The "Delay before conversion" setting only waits for images and fonts; it doesn't make scripts run.
- Embedded videos, maps and other iframes are removed.
- Links in the PDF aren't clickable. The text is there, but it's not a hyperlink.
- Because each page is an image, the file is usually larger than one from a print dialog, and if you zoom right in, edges soften. Compress PDF can bring the size down if that matters.
The upside: the PDF looks exactly as the browser drew it, in any language or script.
For your own HTML, the hint under the tool sums it up: self-contained HTML works best. Put the CSS in a style tag and embed images as base64 data URIs, and the result is reliable.
The settings worth changing
In order of how often I'd touch them:
- "Page size:" defaults to "One long page", a single tall PDF page with no breaks. Nice for archiving and reading on screen. Pick A4, A3, A2, Letter or Legal if it will be printed.
- "Orientation:" is "Auto", which switches to landscape when the layout is wider than a portrait page.
- "Viewport width" is how wide the browser window is when the page is laid out. Leave it on Auto for documents. For a desktop site layout, 1280 or more stops it collapsing into its mobile version.
- "Page margin" is 48 pixels by default (half an inch). The unit can be switched to Inch, Centimeter or Millimeter.
- "Use print stylesheet" applies the page's @media print styles instead of its screen styles.
There are also "Automatically hide cookie notices" (on by default) and "Show URL and date on PDF", which adds a small line at the top of each page with the address or file name and the time of conversion. Handy as a record of what a page said on a given day.
When you use a paper size, the tool tries not to cut through a line of text, an image or a table row at a page break, and it respects CSS page breaks (break-before: page and the older page-break-before: always). If you control the HTML, those are the reliable way to put breaks exactly where you want them.
Which route to pick
If it's HTML you wrote or exported, upload it or paste it, and spend a minute making it self-contained. If it's a page on someone else's site, try the address once, and if you get the "doesn't let other sites read its pages" message, go straight to Print > Save as PDF rather than fighting it.
If what you actually have is a Word document rather than HTML, Word to PDF is the better tool, and if the finished PDF needs to go out by email, the guide on making a PDF small enough to email covers the size side.
Also useful: Word to PDF · Compress PDF