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 🙏

© 2026 – Pkg Stats / Ryan Hefner

pdfbooklet

v1.1.0

Published

Create booklet from a pdf file suitable for compact printing

Readme

Generate booklet format of a PDF file for printing

Save paper, save trees and save lives.

To install

npm i -g pdfbooklet

To use

pdfbooklet [options] <INPUT-FILE.pdf>

OPTIONS:
 --margin-inset X         reduce margin of the original pdf on all sides by X inches
 --margin-inset X,Y       reduce margin X on top and bottom, Y on left and right, in inches
 --margin-inset T,R,B,L   reduce margin-top by T, right by R, bottom by B, left by L, in inches
 --output FILENAME        default is INPUT_FILE-booklet.pdf.
 --paper-size (a4|letter) default is letter
 --range X-Y,+N,A-B,...   select page X to Y from input, insert N blank pages, 
                          then from page A to B
 --signature-size N|all   group N pages (a multiple of 4) into each signature,
                          nested and folded once together, or 'all' to put every
                          page in a single signature. Default is 4 (fold each sheet
                          on its own). Use a larger value to bind thicker books.

How to use

Run the tool on a PDF, print the result in duplex (double-sided), landscape, then fold. That's it.

pdfbooklet mybook.pdf              # -> mybook-booklet.pdf

What happens to the pages

Two source pages are placed side by side on each half of a landscape sheet, in the order that makes them read correctly once folded. For a 4-page document you get one sheet:

        SHEET FRONT              SHEET BACK
      +------+------+          +------+------+
      |      |      |          |      |      |
      |  4   |  1   |          |  2   |  3   |
      |      |      |          |      |      |
      +------+------+          +------+------+
              print both sides, then fold down the middle

                       fold
                        |
                  +-----+-----+
                  |  1  |  2  |  ...  reads 1, 2, 3, 4
                  +-----+-----+

Signatures

A signature is a stack of sheets nested inside one another and folded once as a group. --signature-size controls how many pages go into each signature (always a multiple of 4, since one sheet holds 4 pages).

--signature-size 4 (the default) folds every sheet on its own, then you stack the folded sheets in order:

   [1..4]   [5..8]   [9..12]        each folded separately,
    fold     fold     fold          then stacked and bound

--signature-size 8 nests two sheets, folds them together, then stacks the folded groups. Thicker signatures mean fewer folds to collate, but a thicker fold to crease:

        outer sheet:  8 | 1   ...   2 | 7
        inner sheet:  6 | 3   ...   4 | 5

     nest inner inside outer, fold once  ->  1 2 3 4 5 6 7 8

--signature-size all puts the entire document into one signature — every sheet nested together and folded once (best for thin documents).

Examples

pdfbooklet --signature-size 8 mybook.pdf         # two-sheet signatures
pdfbooklet --signature-size all zine.pdf         # whole zine, one fold
pdfbooklet --margin-inset 0.25 --paper-size a4 mybook.pdf
pdfbooklet --range 1-10,+2,11-20 mybook.pdf      # pages 1-10, 2 blanks, 11-20