跳到正文

PDF 转 SVG

把每一页写成 SVG,文字仍作为真正的文字保留。

在你的设备上处理

这款工具完全在你的浏览器中运行。文件从不上传,你可以在浏览器的网络标签中亲自验证这一点。 亲自验证:打开浏览器的网络标签观察。你会看到一个查询你是否还有剩余任务的小请求,只包含工具名称和一段哈希,绝不会包含文件。

这款工具的作用

Modern PDF.js no longer has an SVG back end, and rebuilding a full PDF-to-SVG vector translator - shading patterns, clipping paths, type 3 fonts, every colour space - is not work that belongs in a browser tab. So this tool does not claim to be one. It offers the two things it genuinely can do: the page as an embedded picture with its real text positioned invisibly on top, or the text alone as true SVG text elements with none of the graphics. Neither is a vector trace of the artwork, and it is better to know that before you download forty files.

With raster on, it suits dropping a page into a web page or a design tool as one self-contained file that scales, stays sharp and can still be searched. Text only suits pulling the wording of a page into a design tool to restyle it, or building a caption layer over artwork you are drawing separately.

工作原理

  1. Drop the PDF onto this page. Files up to 150 MB are accepted.
  2. Choose the mode: with raster for something that looks like the page, text only for genuinely vector text and nothing else.
  3. Leave Keep the text selectable on so the words stay in the file rather than being flattened into the picture.
  4. In raster mode, set the resolution of the embedded picture. 150 dpi is the default and is sharp at normal viewing sizes.
  5. Choose one file per page or a single stacked file, then press Convert to SVG.

Text only is genuinely vector and genuinely incomplete. Every character becomes an SVG text element at its measured position, so you can restyle, recolour and re-space it in any design tool. Every rule, box, logo, photograph and background on that page is gone, because there is no path data to write. That is a fine trade when the words are what you are after, and a bad surprise when they are not.

The y axis is where converters of this kind usually go wrong. SVG counts down from the top of the canvas and PDF counts up from the bottom, so every text position has to be flipped as it crosses over. Get it wrong and the page comes out mirrored vertically, or - more insidiously - each line lands one line off, so copying a word gives you the line above it.

One file per page is the default because SVG has no concept of a page. When you ask for a single file, the pages are wrapped in one root element with each translated below the last, which is the only arrangement that opens sensibly both in a browser and in a design tool.

Rendering and text extraction both happen in your browser through PDF.js, so no page of the document is drawn on anyone else's machine. The only thing that crosses the network is the allowance check, which names the tool and carries a hash of the bytes.

这款工具做不到的事

  • This is not a full vector translation. With raster on, the graphics are an embedded picture rather than paths; with text only, they are absent. Neither mode gives you editable vector artwork of the whole page.
  • Fonts are referenced by name rather than embedded, so a machine without the typeface substitutes another and line lengths shift.

常见问题

我能得到可随意缩放的真正矢量图形吗?
文字可以——它写成真正的 SVG 文字,可缩放到任意尺寸。图形不行。把页面的路径、渐变、裁剪和图案转换过来是一次完整的矢量翻译,这个工具不去尝试,所以带栅格模式下图形是一张嵌入图片,仅文字模式下则不存在。如果你需要可缩放的图形,原始矢量源是唯一可靠的途径。
我该选哪种模式?
如果你想让页面看起来就是那一页,选带栅格:一张页面的嵌入图片,真正的文字隐形地叠在上面,仍可选中和搜索。如果你想把文字当作可编辑的矢量元素、并且可以舍弃所有图形,选仅文字。
我能在设计工具里编辑结果吗?
文字可以在 Illustrator、Inkscape、Figma 以及任何能读 SVG 的软件里选中、改样式和移动。嵌入的页面图片和任何置入的图像一样:你可以移动、缩放和遮罩它,但无法把它拆解成图形。
为什么 SVG 比 PDF 还大?
因为在带栅格模式下,每一页都在文件里携带一张渲染好的图片,以文本编码,而 PDF 把同一页保存为紧凑的绘图指令。调低分辨率可以缩小它,或者用仅文字模式,它只含字符和坐标,生成的文件只有几千字节。
文件会离开我的设备吗?
不会。页面在你浏览器的 Web Worker 里渲染、文字在那里提取,SVG 也在那里组装。不上传任何内容,没有账户,你可以断网转换来验证。

相关工具