ZapPebble
ZapPebble

HTML to PDF

Paste HTML or open an .html file, preview it at page width and download an A4 or Letter PDF. Useful for invoices, reports and email templates.

PDF ToolsProcessed locallyNo account needed
557 chars

Scripts are removed. Images from other websites only appear if those sites allow it.

Preview at page width

Page size

Processed on this device. Nothing is uploaded.

How to use HTML to PDF

Simple steps to get your task done in seconds

01

Paste or open HTML

Paste code or open an .html file from your computer.

02

Check the preview

The preview shows exactly what will go on the pages.

03

Download

Convert and download the PDF.

How Client-Side HTML to PDF Conversion Works

ZapPebble transforms HTML code and web templates into formatted PDF documents directly within your browser. Your code is loaded into an isolated, sandboxed preview frame where CSS styling, tables, fonts, and inline graphics are rendered. You can export a paginated raster PDF using pdf-lib or launch the browser's native Print Tab for 100% crisp, selectable vector typography.

FeatureSpecificationImplementation Details
Input MethodsDirect Code Paste or .html File UploadSupports modern HTML5, inline CSS stylesheets, and embedded base64 data URLs.
Security IsolationSandboxed IframeRestricts JavaScript execution inside the preview frame to prevent cross-site scripting.
Page FormatsA4 (650px content width), US Letter (672px)Calculates responsive viewport widths with standard 0.75-inch margins.

Practical Example: Generating a Professional Billing Invoice

HTML Input

You maintain an HTML invoice template for freelance web development with client billing information, itemized services, tax calculations, and payment terms in an HTML table.

Settings: Select A4 paper · Preview updates live in the sandbox.
Output Options
  • Quick PDF: Click "Download PDF" to generate a clean multi-page document in 2 seconds.
  • Vector Print Tab: Click "Open Print Tab" to open the browser print dialog and save selectable vector text.
  • Zero server calls: sensitive customer financial data stays on your machine.

Important Limitations & Recommendations

External Image URLs

If your HTML references external image URLs that lack CORS (Cross-Origin Resource Sharing) headers, the browser may block them from the canvas. Use inline base64 data URLs for logos and signatures.

CSS Print Media Queries

For pixel-perfect pagination with page-break controls (page-break-inside: avoid), use theOpen Print Tab option which fully respects browser print stylesheets.

Confidential Invoicing

Customer invoice details, tax numbers, and rate sheets remain strictly in browser RAM. Zero third-party telemetry is collected.

Frequently Asked Questions

Not here. Fetching another website needs a server. For a page you have open, use your browser Print and choose Save as PDF.

Other utilities that pair well with HTML to PDF

View all tools