npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

svgs2pdf

v1.1.11

Published

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

Downloads

3

Readme

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:

Format | size ------- | ---------------- Letter | 8.5in x 11in Legal | 8.5in x 14in Tabloid | 11in x 17in Ledger | 17in x 11in A0 | 33.1in x 46.8in A1 | 23.4in x 33.1in A2 | 16.54in x 23.4in A3 | 11.7in x 16.54in A4 | 8.27in x 11.7in A5 | 5.83in x 8.27in A6 | 4.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