Command line usage

Use PdfToSvg CLI to convert PDF documents to SVG files on the command line. The tool extracts text, images and fonts from the PDF document into SVG files ready to be embedded in HTML or opened in vector graphics editors for further processing.

Download PdfToSvg CLI v1.8.0
(requires .NET Framework 4.5)

Usage

pdftosvg [OPTIONS...] <input> [<output>]

Options

<input>Path to the input PDF file.
<output>

Path to the output SVG file(s). A page number will be appended to the filename.

Default: Same as <input>, but with .svg as extension.

--pages <pages>

Pages to convert. Syntax:

12..15Converts page 12 to 15
12,15Converts page 12 and 15
12..Converts page 12 and forward
..15Converts page 1 to 15

Default: all pages

--password "<password>"

Owner or user password for opening the input file. By specifying the owner password, any access restrictions are bypassed.

--no-colorDisables colored text output in the console.
--non-interactiveDisables any interactive prompts and progress reports.

Conversion options

--include-fonts <value>

Specifies how fonts from the PDF should be embedded in SVG:

noneOnly local fonts will be used
embed-woffFonts will be embedded as WOFF fonts
embed-opentypeFonts will be embedded as OpenType fonts

Default: embed-woff

--include-links <true|false>

Determines whether web links from the PDF document will be included in the generated SVG. Note that this property only affects links to websites. Other types of links, including links within the document, are currently not supported.

Default: true

--include-annotations <true|false>

Determines whether annotations drawn in the PDF document should be included in the generated SVG.

Default: true

--include-hidden-text <true|false>

Determines whether hidden text from the PDF document will be included in the generated SVG.

Default: true

--use-system-fonts [<true|false>]

Specifies if fonts installed in the operating system can be used during conversion. System fonts are used for decoding text during the conversion process, but are not embedded in the output SVG. Note that conversion success might vary between machines if this option is enabled depending on the installed fonts.

Default: false

--external-fonts-dir <path>

Specifies a directory where fonts can be found if they are not embedded in the PDF document. These fonts might be embedded in the output SVG.

Default: <none>

Example

pdftosvg input.pdf output.svg --pages 1..2,9

Converts page 1, 2 and 9 from input.pdf to the output files:

  • output-1.svg
  • output-2.svg
  • output-9.svg