1.1.11 • Published 1 month ago

svgs2pdf v1.1.11

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 month ago

svgs2pdf

forked from svg2pdf-cli

A command-line tool for rendering multiple SVG images to multiple or a single PDF file

Installation

svgs2pdf can be installed from NPM using:

npm install -g svgs2pdf

Features

  • Support single or multiple SVG file input
  • Support setting SVG size (width and height), NOTE: This option only can change the svg image size on the PDF page, but can't set PDF page size.
  • Support single or multiple PDF file output. When multiple SVG files are provieded single pdf output requires pdftk binary installed

Because svgs2pdf uses Chromium to render the svg, it only supports these formats:

Formatsize
Letter8.5in x 11in
Legal8.5in x 14in
Tabloid11in x 17in
Ledger17in x 11in
A033.1in x 46.8in
A123.4in x 33.1in
A216.54in x 23.4in
A311.7in x 16.54in
A48.27in x 11.7in
A55.83in x 8.27in
A64.13in x 5.83in

Useage

Usage: svgs2pdf [options] <svg1> ...
Options:
      --help        Show help                                          [boolean]
      --version     Show version number                                [boolean]
  -w, --width       Set width of PDF, allowed units: %, px
  -h, --height      Set height of PDF, allowed units: %, px
  -f, --format      Set format of PDF, allowed options: Letter, Legal, Tabloid,
                    Ledger, A0, A1, A2, A3, A4, A5, A6
  -o, --output-dir  Set the output directory for pdf file(s)
  -m, --merge-file  Set the filename for a single pdf cointaining each svg as a
                    page (requires pdftk)

e.g.: svgs2pdf source1.svg
e.g.: svgs2pdf source1.svg source2.svg source3.svg
e.g.: svgs2pdf -w 100px -h 100px source.svg
e.g.: svgs2pdf -w 100px -h 100px -f A4 --output-dir /tmp source1.svg
e.g.: svgs2pdf -m combined-pdf.pdf source1.svg  source2.svg
1.1.11

1 month ago

1.1.10

1 month ago