DailyOnWeb
ZH

Convert HTML to PDF

Paste your HTML or upload an .html file, pick a page size and download the PDF. Everything happens in your browser.

或将 .html 文件拖放到此框的任意位置

拖放您的 HTML 文件以加载

您的 HTML 在浏览器中转换,绝不会被上传。

图片和字体必须内嵌(data: URL)或通过 CORS 头提供。粘贴的代码无法加载相对文件路径,且不会运行脚本。

HTML 最大 2 MB。

广告

What does HTML to PDF do?

It renders your HTML and CSS and saves the result as a PDF with the page size and margins you choose.

Private by design

Your HTML is converted on your device and is never uploaded to our servers.

Why use our HTML to PDF tool?

Files stay private

Everything runs in your browser, with no upload.

Live preview

See how your page looks before you create the PDF.

Two ways to save

Create a PDF directly, or print with selectable text.

Free to use

No sign-up, no watermark, no software to install.

Convert HTML to PDF Online for Free

Use the DailyOnWeb HTML to PDF tool to turn HTML code or an .html file into a PDF. It is handy for invoices, reports, email templates and saved web pages.

How to convert HTML to PDF

  1. Paste your HTML into the editor, or upload an .html file.
  2. Use the Preview tab to check how it looks.
  3. Choose page size, orientation and margin.
  4. Click Create PDF and download the result.

Create PDF or Print?

  • Create PDF gives a PDF that looks like the preview. Pages are saved as pictures.
  • Print / Save as PDF uses your browser, so the text stays selectable and searchable.

Tips

  • Embed images and fonts as data URLs, or use https links that allow cross-origin loading.
  • Scripts are not run, so use plain HTML and CSS.
  • Reduce the file size with Compress PDF afterwards.

HTML to PDF is free, private and works on phones, tablets and computers.

常见问题 (常见问题)

相关工具

广告