Guide

How to convert HTML to PDF – video guide

Save an HTML file and its CSS as a clean PDF – no software, no print dialog. The video shows how with a sample invoice; the steps are written out below.

How to convert HTML to PDF

Open the HTML to PDF converter and follow these steps:

  1. Choose the HTML file: Under “HTML file”, select your file – in the video, the invoice invoice.html. The code appears in the input field; you can also paste it there directly.
  2. Add CSS: Under “CSS file(s) – optional”, choose the stylesheet, here invoice.css. This keeps fonts, colors and tables in the PDF.
  3. Convert: Click “Convert to PDF”. The preview shows the finished PDF.
  4. Download: Click “Download .pdf” to save the file – with no watermark.

HTML to PDF with CSS: your layout stays intact

The converter renders your HTML with a real browser engine. Fonts, colors, spacing and tables from your stylesheet end up in the PDF exactly as you designed them, backgrounds included. In the sample invoice from Harbour Lane, the logo, line-item table and total look just as they do in the HTML. You can also select several CSS files at once.

Save HTML as PDF: embed images and fonts

For security reasons, the converter does not load files from external addresses. Images, logos and fonts therefore belong directly in the HTML, for example as inline SVG or as a data URL. The invoice in the video draws its logo as SVG inside the HTML. JavaScript is not executed; the PDF shows the HTML code as it is.

HTML file to PDF – without the print dialog

You can also open an HTML file in your browser and save it as a PDF through the print dialog. But backgrounds and colors are often missing, and the browser's headers and footers end up in the document. The converter creates the PDF without such extras and without a watermark. If you regularly convert HTML to PDF, for example invoices from your own system, use the PDF API.

Frequently Asked Questions

How do I convert HTML to PDF?

Upload an HTML file or paste the code, add CSS if you like, click “Convert to PDF” and download the PDF.

Can I paste HTML code directly?

Yes. Instead of choosing a file, paste the code into the field under “HTML file”. There is a separate field for CSS.

Why are images missing from my PDF?

For security reasons, the converter does not load files from external addresses. Embed images directly in the HTML as a data URL or as SVG.

Is JavaScript executed?

No. The PDF shows the HTML as it looks without scripts. Content that only a script would generate is therefore missing.

Is HTML to PDF on web2pdf.eu free?

Yes. The conversion costs nothing, needs no sign-up, and the PDF has no watermark.

Convert HTML to PDF now

Find more video guides in the guides overview.