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

paperdown

v1.0.1

Published

Markdown to PDF on the command line, with real typography: Barlow and Fira Code, syntax highlighting, smart page breaks and page numbers.

Readme

paperdown - Professional Markdown to PDF Converter

A powerful CLI tool that converts Markdown files into professionally styled PDF documents with WYSIWYG rendering using Puppeteer.

✨ Features

  • 📝 Rich Markdown Support: Full GitHub Flavored Markdown (GFM) support including tables, strikethrough, and task lists
  • 🎨 Professional Typography: Clean design using Barlow and Fira Code fonts
  • 💻 Syntax Highlighting: Automatic code highlighting for 180+ languages via highlight.js
  • 📄 Smart Page Breaks: Prevents tables, code blocks, and images from splitting across pages
  • 🔢 Auto Page Numbers: Headers and footers with automatic page numbering
  • 🖼️ Image Support: Handles images, figures, and captions with proper scaling
  • 🎯 A4 Layout: Professional A4 format with 20mm margins
  • 🛠️ Customizable: Support for custom CSS themes and header/footer text
  • ⚡ Fast Rendering: Powered by Puppeteer's headless Chrome

📦 Installation

From npm

npm install -g paperdown
paperdown document.md

Standalone executable

Grab the binary for your platform from the latest release — no Node.js required.

Prerequisites

  • A Chromium-based browser: Chrome, Edge or Chromium. paperdown drives the browser already installed on your machine instead of downloading its own copy, so installing it stays small and fast. On Windows, Edge ships with the system and is picked up automatically.
  • Node.js 18 or higher, only when installing from npm or building from source.

If your browser lives somewhere unusual, point paperdown at it:

# Linux / macOS
export PUPPETEER_EXECUTABLE_PATH=/opt/chromium/chrome

# Windows (PowerShell)
$env:PUPPETEER_EXECUTABLE_PATH = "D:\Chromium\chrome.exe"

From source

git clone https://github.com/denisbilli/paperdown.git
cd paperdown
npm install

🛠️ Building

Build from Source

To compile the TypeScript code:

npm run build

Create Standalone Executable (.exe)

You can package the application into a single executable file:

npm run package

The executable will be created in the output/ directory (e.g., output/paperdown.exe).

Note: neither the executable nor the npm package bundles Chromium, which keeps both small. paperdown uses the Chrome, Edge or Chromium already installed on your machine.

🚀 Usage

As a CLI Tool (Development)

# Basic conversion
npm start -- input.md

# With custom CSS and title
npm start -- input.md --css styles/custom.css --title "My Document"

Using the Executable

# Windows
.\output\paperdown.exe input.md

# With options
.\output\paperdown.exe input.md --header "Confidential" --footer "Company Name"

Command Line Options

| Option | Description | Example | |--------|-------------|---------| | input.md | Input Markdown file (required) | paperdown doc.md | | --css | Path to custom CSS file | --css style.css | | --title | Document title (overrides H1) | --title "Report" | | --header | Custom header text | --header "Draft" | | --footer | Custom footer text | --footer "© 2026" |

📂 Project Structure

├── src/
│   ├── index.ts        # CLI entry point
│   ├── parser.ts       # Markdown parsing logic
│   ├── renderer.ts     # Puppeteer PDF generation
│   ├── template.ts     # HTML templating
│   └── styles/         # Default CSS styles
├── examples/           # Example files
├── dist/               # Compiled JavaScript
├── output/             # Generated executables
└── package.json

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.