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.
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 | |||||||||
--pages <pages> | Pages to convert. Syntax:
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-color | Disables colored text output in the console. | |||||||||
--non-interactive | Disables any interactive prompts and progress reports. |
Conversion options
--include-fonts <value> | Specifies how fonts from the PDF should be embedded in SVG:
Default: | ||||||||||
--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: | ||||||||||
--include-annotations <true|false> | Determines whether annotations drawn in the PDF document should be included in the generated SVG. Default: | ||||||||||
--include-hidden-text <true|false> | Determines whether hidden text from the PDF document will be included in the generated SVG. Default: | ||||||||||
--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: | ||||||||||
--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: |
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.svgoutput-2.svgoutput-9.svg