← 返回命令列表

Linux command

pdf2svg 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Convert PDF page to SVG

pdf2svg [input.pdf] [output.svg]

Convert specific page

pdf2svg [input.pdf] [output.svg] [2]

Convert all pages

pdf2svg [input.pdf] [output_%d.svg] all

说明

pdf2svg converts PDF files to Scalable Vector Graphics (SVG) format. It preserves vector graphics, text, and formatting, making the output suitable for web use and editing. The tool uses Poppler for PDF parsing and Cairo for SVG rendering. To convert every page in a single run, use all as the page argument and include the %d placeholder in the output filename — pdf2svg substitutes the page number at write time (e.g. `pdf2svg book.pdf page_%d.svg all` produces `page_1.svg`, `page_2.svg`, …).

参数

input.pdf
Input PDF file.
output.svg
Output SVG file.
page
Page number (1-indexed).
all
Convert all pages.

FAQ

What is the pdf2svg command used for?

pdf2svg converts PDF files to Scalable Vector Graphics (SVG) format. It preserves vector graphics, text, and formatting, making the output suitable for web use and editing. The tool uses Poppler for PDF parsing and Cairo for SVG rendering. To convert every page in a single run, use all as the page argument and include the %d placeholder in the output filename — pdf2svg substitutes the page number at write time (e.g. `pdf2svg book.pdf page_%d.svg all` produces `page_1.svg`, `page_2.svg`, …).

How do I run a basic pdf2svg example?

Run `pdf2svg [input.pdf] [output.svg]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does input.pdf do in pdf2svg?

Input PDF file.