Paste any HTML with CSS — get a pixel-perfect PDF in seconds.
HTML-to-PDF conversion is one of the most versatile tools in a developer's or designer's toolkit. Whether you need to generate invoices, produce printable reports, archive email newsletters, or share a web page as a static document, converting HTML to PDF gives you a universally readable, format-faithful output.
OneClickPDF uses WeasyPrint, a Python-based rendering engine that interprets HTML and CSS the same way a browser would — but outputs PDF pages instead of a screen. It supports CSS3 properties including flexbox layouts, custom web fonts (when embedded as base64), print media queries, and page-break controls.
For best conversion quality, follow these tips:
<style> blocks or inline styles rather than external CSS files@page CSS rules to control page size and marginsYes. The converter uses WeasyPrint, which supports a broad subset of CSS3 including flexbox, custom colors, borders, margins, and CSS print rules. Static CSS3 is fully supported. JavaScript-driven styles or animations are not executed, so paste the final rendered HTML for best results.
Yes. In most browsers, press Ctrl+U (or Cmd+U on Mac) to view a page's HTML source, copy everything, paste it into the text area, and click Convert. For best fidelity, inline your CSS or add a <style> block, since external stylesheets may not be fetched from remote servers.
Open the email in your mail client and look for a "View original" or "Show source" option. Copy the raw HTML source, paste it into OneClickPDF's text area, and click Convert. HTML emails with inline styles work especially well because they already follow best practices for self-contained rendering.
Yes — the most reliable approach is to embed images as base64 data URIs directly in your HTML (e.g., src="data:image/png;base64,..."). External image URLs hosted on other domains may be blocked for security reasons. Many online tools can convert an image file to a base64 string for you.
There is no strict character limit on pasted HTML. However, very large documents or those with many embedded base64 images may take a few extra seconds to process. For the fastest results, keep your HTML under 500 KB of raw text and avoid embedding unnecessarily large images.