HTML 转 PDF
将 HTML 文件或保存的网页变成带标题、表格、链接和图片的干净 PDF。
你的文件始终留在你的设备上。
工作原理
选择一个 .html 文件,或粘贴页面的 HTML。转换工具会在浏览器中读取它,保留页面的正文,并排成整洁的 PDF:标题变成书签,链接仍可点击,表格、列表和代码块保持原样。
设置
- 页面尺寸:A4 或 US Letter。
- 文字大小:小、中或大。较大的文字在手机或电子阅读器上更易阅读。
转换后可以更改设置并重新生成 PDF,无需再次上传。
会保留什么
- 保留标题、段落、粗体和斜体、列表、引用、表格、代码块、链接和图片。
- 勾选只保留正文时,会去掉菜单、侧栏、页眉、页脚和页面中隐藏的部分;脚本、表单和视频始终会被去掉。
- 不复制网站自己的字体、颜色、分栏或 CSS 版式。PDF 使用一种简洁易读的样式。
- 要转换网页,请先在浏览器中保存它(按 Ctrl+S,Mac 上按 Cmd+S,然后选择“网页,全部”)。然后把 .html 文件和它文件夹中的图片一起选中。
常见问题
Is my file uploaded to your server?
No. Your HTML and its pictures are read and the PDF is made in your browser, so nothing leaves your device. Only a count of how many conversions you ran today is sent to our server.
Can I convert a web page from its address (URL)?
Not directly, because fetching a page from another website would mean sending it through a server. Instead, save the page in your browser (Ctrl+S, or Cmd+S on a Mac, and choose "Webpage, Complete"), then choose the .html file together with the pictures in the folder saved next to it.
Does the PDF look exactly like the web page?
No, and that's on purpose. The text is laid out in one clean, readable style: headings, paragraphs, lists, tables, quotes, code blocks, links and pictures are kept, but the site's own fonts, colours, columns and CSS layout aren't. Menus, sidebars, headers and footers are left out unless you untick Main content only.
Are pictures included?
Pictures embedded in the HTML (as data URLs) and picture files you choose together with the page are included. Pictures that are only on other websites aren't downloaded, to keep your file private.
Which languages does it support?
English and other languages written in Latin, Greek or Cyrillic letters. Scripts such as Urdu, Arabic, Hindi and Chinese aren't supported yet. If a file has characters the PDF can't show, the tool tells you which ones.
What's the file size limit?
One file at a time, up to 50 MB.