Skip to main content
BoringPDF

How to convert HTML to PDF

HTML to PDF opens a workspace with your HTML on the left, a live preview in the middle and page settings on the right. Paste HTML or upload a file, adjust the settings and click Convert to PDF. This walkthrough converts a small price list page.

Updated

Step 1: open the workspace

Open HTML to PDF. It starts with example HTML so you can see how the preview works. Choose Paste HTML to type or paste code, or Upload File for an .html file.

HTML to PDF workspace with HTML code, a live preview and page settings
Code on the left, the live preview in the middle.

Step 2: add your HTML and set up the page

  • Page size and orientation, such as A4 portrait.
  • Page margin: None, Small or Big.
  • Allow online images, if your HTML loads pictures from the web.
  • Pagination, capture scale and background.
An uploaded price list HTML file shown in the preview
The price list, previewed on an A4 page.

Step 3: convert and download

Click Convert to PDF and download the result. Text in the HTML stays selectable and searchable in the PDF.

Result screen confirming the PDF was created
The page is now a PDF.

Good to know

  • It converts HTML you paste or a single HTML file, not a website address.
  • Images referenced by relative paths need to be embedded as data URLs, and CSS needs to sit in a style block or style attributes, because linked stylesheets are removed.
  • Simple, print-friendly CSS converts most predictably.

Good uses

  • Turning an email template, invoice or receipt written in HTML into a PDF.
  • Saving a price list or report generated by your own system.
  • Producing printable documents from simple web-page layouts.

Tips for a clean PDF

Keep the HTML simple: headings, paragraphs and tables convert most predictably. Inline your CSS in a style tag, embed small images as data URLs, and use the live preview to check page breaks before converting. Choose Big margins for documents that will be printed and filed.

What converts and what does not

Text, headings, tables, colors and inline images convert. Scripts do not run in the PDF, and images from other websites appear only if you allow online images. Form controls such as inputs, buttons and whole forms are removed, so put any text they contain into ordinary HTML first.

Questions

Can I convert a web page by its URL?

No. Save or copy the page's HTML and paste or upload it instead.

Is the text searchable?

Yes. Text in the HTML stays selectable and searchable in the PDF.