HTML to PDF
HTML to PDF renders a web page URL or a block of pasted HTML into a PDF with WeasyPrint, applying the page's CSS but not running any JavaScript.
About HTML to PDF
Useful when you need a fixed copy of something on the web: an invoice or booking confirmation shown only as a web page, an article you want to keep, a receipt, or documentation to read offline. It is also handy for generating a PDF from HTML and CSS you have written yourself, using print styles and page rules rather than a word processor.
The important limitation: JavaScript is not executed. WeasyPrint fetches the HTML and applies the CSS, and that is all. A modern single-page app that builds its content in the browser will therefore produce a blank or skeletal PDF. Pages behind a login, or ones that block automated requests, will not work either. Server-rendered pages and static HTML convert reliably.
How to html to pdf
- Paste a page URL, or switch to the box and paste HTML.
- Set the page size and orientation you want for the output.
- Click Convert to PDF and wait for the page to render.
- Download the PDF and check the content came through.
Why use this tool
URL or raw HTML
Point it at a live address or paste markup directly, which is the quicker route when you are testing print stylesheets or generating a template.
Real CSS support
WeasyPrint honours print stylesheets, @page rules, margins, page breaks and web fonts, so a well-styled document paginates the way you designed it.
Selectable text output
The result is real text and vector graphics rather than a screenshot, so the PDF stays searchable, copyable and small even for long pages.