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

@imprint-pdf/cli

v1.0.0-alpha.5

Published

CLI for imprint-pdf: render, dev preview server, and PDF/X + PDF/UA validation.

Readme

@imprint-pdf/cli

Command-line tools for imprint-pdf.

pnpm add -D @imprint-pdf/cli

Commands

imprint render

Render a React component to a PDF file.

imprint render ./src/templates/Invoice.tsx --out ./out/invoice.pdf

| Flag | Default | Description | | --------- | ----------- | -------------------------------------------- | | --out | ./out.pdf | Output file path. | | --props | {} | JSON-encoded props to pass to the component. | | --watch | off | Rebuild on file change. | | --open | off | Open in the system PDF viewer after render. |

imprint dev

Live preview server with element inspector.

imprint dev ./src/templates/Invoice.tsx

Opens a browser tab at http://localhost:4000 with the rendered PDF on the left and a tree inspector on the right. Click any node to see its resolved style, sanitized props, and post-layout geometry box (x/y/w/h, padding, content size, effective fontFamily). On file save, both panes refresh over SSE — no polling, no hard reload.

| Flag | Default | Description | | -------- | ------- | ------------ | | --port | 4000 | Listen port. |

Endpoints:

  • GET / — inspector UI
  • GET /pdf — current PDF bytes (application/pdf)
  • GET /inspect{ file, renderedAt, tree } JSON tree (PdfNode IR + geometry)
  • GET /events — Server-Sent Events; reload fires after each successful render

The fixture file must be loadable by Node directly (.js / .mjs) or via a TypeScript loader (e.g. node --import tsx ./node_modules/@imprint-pdf/cli/dist/bin.js dev …).

imprint validate

Validate a PDF against PDF/X-4 or PDF/UA-1 using veraPDF.

imprint validate ./out/invoice.pdf --profile pdf-ua-1

Requires @imprint-pdf/print or @imprint-pdf/ua. Exits non-zero on failure — wire it into your CI pipeline.

# In CI
imprint render ./src/Invoice.tsx --out ./dist/invoice.pdf
imprint validate ./dist/invoice.pdf --profile pdf-ua-1

imprint init

Scaffold imprint.config.ts in the current directory.

npx imprint init

Config

// imprint.config.ts
import { defineConfig } from '@imprint-pdf/core/config';

export default defineConfig({
  fonts: [
    { family: 'Inter', src: './public/fonts/Inter.woff2' },
    { family: 'JetBrains Mono', src: './public/fonts/JetBrainsMono.woff2' },
  ],
  // tailwind.stylesheet auto-detects src/app.css, src/globals.css, etc.
});