免费在线将 HTML 转换为 PDF

document.pdf
0 pages
Select one or more pages on the left, then pick a tool above.
.pdf
拆分 PDF
Set up your ranges on the right
重新排列 PDF 页面
Drag a page to move it
旋转 PDF 页面
Hover a page to rotate it
删除 PDF 页面
提取 PDF 页面
Select the pages to keep
添加 PDF 页码
1

为 PDF 添加水印
VitePDF
100%
25%
PDF OCR 文字搜索

Scans every page (including scanned/image-only pages with no selectable text) so you can search for a word or phrase.

PDF 转 Word

Extracts the real text where the PDF has it, and runs OCR automatically on scanned/image-only pages. Works best for simple, single-column documents — complex layouts, tables, and multi-column text won't be preserved exactly.

PDF 转 PowerPoint

Each page becomes one slide, rendered as a full-page image — layout, fonts, and graphics come out exactly as they look in the PDF. Runs entirely in your browser.

PDF 转 Excel

Reconstructs rows and columns from the PDF’s own text spacing, and runs OCR automatically on scanned/image-only pages. Works best for simple, clearly-aligned tables — free-form text near a table may get split oddly.

Word 转 PDF
PowerPoint 转 PDF
Excel 转 PDF
PDF 转 JPG

Each page becomes a .jpg image. Runs entirely in your browser — nothing is uploaded. Multiple pages are zipped together for download.

JPG 转 PDF
HTML 转 PDF

PDF 转 HTML

Produces one self-contained .html file — an image of each page with an invisible text layer on top, so it looks exactly like the PDF but the text stays selectable, searchable (Ctrl/Cmd+F), and copyable. Runs entirely in your browser.

解锁 PDF
PDF 密码保护
签署 PDF
遮盖内容
压缩 PDF
填写 PDF 表单
裁剪 / 调整页面大小
PDF 转纯文本
比较两个 PDF

原始 PDF

点击选择,或拖放到此处

修订版 PDF

点击选择,或拖放到此处

修复 PDF
从 PDF 中提取图片
编辑 PDF 元数据
朗读 PDF
查找并移除空白/重复页面
合并页面以便打印
转换为灰度
书签 / 目录

如何在线将 HTML 转换为 PDF

  1. 选择来源:网页链接,或HTML 文件 / 粘贴代码
  2. 对于文件或粘贴的代码,选择转换模式:在浏览器中(隐私安全)或更高保真度(服务器上真实的无头浏览器渲染)。网页链接始终在服务器上渲染。
  3. 点击转换为 PDF
  4. 下载生成的 PDF。

为什么用 VitePDF 转换

  • 按照真实浏览器渲染的效果(包括打印样式表)转换实时网页。
  • 或者对自己的 HTML 文件使用完全隐私的浏览器内模式。
  • 无需账号,无水印。

常见问题

为什么转换网页链接总是使用服务器?

浏览器会阻止一个页面直接获取另一个网站的完整内容(这是一种叫做 CORS 的安全限制),所以渲染一个网页链接需要来自服务器的真实请求,而不能来自你的浏览器标签页。

使用更高保真度模式时我的内容安全吗?

你的 HTML 或目标链接的内容会在转换服务器上使用真实的浏览器引擎渲染,与任何精确渲染的在线 HTML 转 PDF 服务的工作方式相同,且不会在转换后被保留。

仅浏览器模式支持 JavaScript 渲染的内容吗?

只能部分支持——它会捕捉页面渲染后可见的文字和图片,但复杂的脚本、动画以及部分现代 CSS 效果可能无法完全按预期呈现。对于严重依赖 JavaScript 的内容,请使用服务器模式。