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

pdf-made-easy

v1.0.1

Published

A CLI application for building and developing PDF documents.

Readme

PDF Made Easy

PDF Made Easy (PME) is a CLI application for building and developing PDF documents.

PME demo showing how the auto refresh feature works as the output PDF refreshes when either the template or data file is updated

What this is

  • A CLI you use to design and generate PDFs on your local machine using Liquid templates and YAML data files. Under the hood, it uses Puppeteer to create the PDFs.
  • Something I created because I wanted to generate PDFs using the familiar HTML and CSS that I know.

What this is NOT

  • A library you use to incorporate into your scripts.
  • Something you use on your server to generate PDFs on the fly. It's not very efficient to use a whole browser instance just to do that, using something like PDFKit, @pdfme/pdf-lib, or MuhammaraJS would probably be better.

Requirements

Installation

Global

npm install --global pdf-made-easy

Local

npm install pdf-made-easy

Usage

pme
pme [options]
pme <command> [options]

Commands:
  pme        Same as 'dev' command                                     [default]
  pme dev    Watch data and template files and output PDF on change
  pme build  Output PDF using data and template files

Options:
  -h, --help      Show help                                            [boolean]
  -v, --version   Show version number                                  [boolean]
  -c, --config    Path to JavaScript config file                        [string]
  -d, --data      Path to YAML data file          [string] [default: "data.yml"]
  -o, --output    Path to PDF output file       [string] [default: "output.pdf"]
  -t, --template  Path to Liquid template file
                                           [string] [default: "template.liquid"]

Examples:
  pme
  pme -d info.yml
  pme dev -t ./templates/default.liquid
  pme build -o /home/user/document.pdf
  pme -d info.yml -t ./templates/default.liquid -o /home/user/document.pdf

Passing options to Puppeteer and LiquidJS

You may want to specify options to change the default behavior of the libraries that this CLI uses. For that, you can create a JavaScript config file that exports a config object at the current working directory where you will invoke pme or point to one using the --config or -c flag. By default, pme will try to find pme.config.js, pme.config.mjs, and pme.config.cjs in the current working directory, in that order.

Let's say you don't want the Chrome instance Puppeteer will use to be sandboxed, you want to be notified when you don't set variables in your YAML config file that your Liquid template expects, and you want your PDF to be in landscape. You can create a pme.config.mjs with the following contents:

import { defineConfig } from "pdf-made-easy";

export default defineConfig({
	launchOptions: { args: ["--no-sandbox"] },
	liquidOptions: { strictVariables: true },
	pdfOptions: { landscape: true },
});

defineConfig is a helper to give you autocompletion and to check that you've provided the correct config keys. All of these settings are optional, you can provide some, a few, or none of them. Below are links to further documentation for what other options you can set:

Note: For launchOptions, handleSIGHUP, handleSIGINT, and handleSIGTERM are always set to false since pme handles those signals itself. As for pdfOptions, path is always set to what is passed to the --output or -o flag.

License

Copyright 2023-present Matthew Espino

This project is licensed under the Apache 2.0 license.