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: |
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