Converting an HTML page to PDF is useful for archiving web articles, creating documents from online content, or generating PDFs from custom HTML templates. OnlinePdfEditor accepts local .html files and converts them to PDF directly in the browser.
The conversion uses html2canvas to capture the visual rendering of the page and embeds it in the PDF as a high-resolution image. Inline CSS and style sheets embedded in the HTML file are correctly applied — it supports flexbox, grid, CSS variables, and most modern CSS3 properties. Images referenced with relative paths are included if the files are in the same folder.
Fundamental difference from 'PDF to HTML' — which goes in the opposite direction: this conversion is for those who have a web document and want a PDF; that one is for those who have a PDF and want a web page. A frequent use case for 'HTML to PDF': you have an invoice template in HTML/CSS and want to generate fillable PDFs; another: you want to archive a web article saved as .html before it is removed from the site. Limitation: the conversion captures the page as a visual snapshot, not native text — the resulting PDF is an image, not a searchable text document.