ZeroKit

Loading tool…

How to Convert HTML or Markdown to PDF

The HTML/Markdown to PDF tool renders your markup and exports it as a downloadable PDF document — with customizable page size and margins.

  1. Paste HTML or Markdown content into the editor.
  2. Customize page size (A4, Letter) and margins.
  3. Click Export and download the rendered PDF.

How the Conversion Works

The tool renders your HTML/Markdown in a hidden browser viewport, then captures it as a PDF using jsPDF and html2canvas. Text, images, links, and CSS styling are all preserved. This is ideal for generating reports, invoices, documentation, and printable pages from web content.

Why Use Our HTML to PDF Tool?

  • Markdown support — write in Markdown and export directly to PDF.
  • Page size options — A4, Letter, and custom dimensions.
  • CSS styling — your CSS is applied to the PDF output.
  • Browser-based — no server processing required.

Frequently Asked Questions

Does it support CSS?

Yes. Inline and embedded CSS is rendered in the PDF. External stylesheets referenced by URL may not load in all cases.

Can I set page breaks?

Use the CSS property page-break-before: always on elements where you want a new page to start.

Are images included?

Yes. Images referenced in the HTML are rendered in the PDF if they are accessible (same-origin or CORS-enabled).

Is my content private?

Yes. Rendering happens in your browser. No content is sent to a server.

Related Tools You Might Like