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

inkoxide

v0.6.5

Published

Native PDF layout and rendering engine: declarative document tree in, PDF bytes out.

Readme

inkoxide

Native PDF engine: a declarative document tree (JSON or MessagePack) in, PDF bytes out.

npm install inkoxide

Prebuilt binaries ship as per-platform packages that npm installs automatically (as optional dependencies) for the current platform:

| Platform | Package | | --------------------- | --------------------------- | | Linux x64 (glibc) | @inkoxide/linux-x64-gnu | | Linux x64 (musl) | @inkoxide/linux-x64-musl | | Linux arm64 (glibc) | @inkoxide/linux-arm64-gnu | | macOS arm64 | @inkoxide/darwin-arm64 | | macOS x64 | @inkoxide/darwin-x64 | | Windows x64 | @inkoxide/win32-x64-msvc |

Linux glibc builds need glibc 2.35 or newer. Node.js 22 or newer; ES modules only. Other platforms: build from source with scripts/build-node.sh, which puts inkoxide.<platform>.node next to the loader.

import { readFileSync, writeFileSync } from 'node:fs';
import { registerFont, render, validate, InkoxideError } from 'inkoxide';

// Once at startup: fonts live in a process-wide cache.
registerFont('Inter-Regular', readFileSync('fonts/Inter-Regular.ttf'));

const doc = {
  version: 1,
  fonts: [{ id: 'Inter-Regular', family: 'Inter' }],
  pages: [{ size: { width: 595.28, height: 841.89 }, margin: { top: 48, right: 48, bottom: 48, left: 48 },
            children: [{ type: 'text', runs: [{ text: 'Hello', font: 'Inter-Regular', size: 24 }] }] }],
};

try {
  // Runs on the libuv pool; the event loop keeps running.
  const pdf = await render(JSON.stringify(doc), { images: { logo: readFileSync('logo.jpg') } });
  writeFileSync('out.pdf', pdf);
} catch (e) {
  if (!(e instanceof InkoxideError)) throw e;
  // e.code: 'UNKNOWN_FONT', 'INVALID_VALUE', …, 'INVALID_ARGUMENT' or 'INTERNAL'
  // e.path: 'pages[0].children[0].runs[0].font' ('' when not tied to a location)
  console.error(e.code, e.path, e.message);
}

// The problems at once (at most 100), without rendering: [{ code, path, message }, …]
console.log(validate(JSON.stringify(doc)));

Options, defaults and error codes are typed in index.d.ts and described in the API reference. The document format is in the schema reference and the example documents. To write documents as React components, use @inkoxide/render.