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

@omsimos/pdf-raster

v0.1.1

Published

High-performance PDF to image conversion for Node.js and Bun.

Readme

@omsimos/pdf-raster

NPM Version License Bun

Blazing fast, native PDF-to-image conversion for Node.js and Bun.

@omsimos/pdf-raster renders PDF pages into high-quality image buffers through a small, high-performance server-side API. Built with Rust and PDFium, it is roughly 4x–8x faster than the included pdfjs-dist canvas backends in the current local benchmark sample.

Documentation | GitHub

📦 Install

# Bun
bun add @omsimos/pdf-raster

# PNPM
pnpm add @omsimos/pdf-raster

# NPM
npm install @omsimos/pdf-raster

🚀 Quick Usage

import { convert } from "@omsimos/pdf-raster";

const [page] = await convert("./report.pdf", {
  pages: [0], // 0-indexed page numbers
  dpi: 300, // High resolution for OCR and VLM inputs
});

// page.data is the encoded image buffer (default: png)
console.log({
  pageIndex: page.pageIndex,
  mimeType: page.mimeType,
  width: page.width,
  height: page.height,
});

Output Types

type ConvertedPage = {
  pageIndex: number;
  data: Buffer;
  mimeType: "image/png" | "image/jpeg" | "image/webp";
  width: number;
  height: number;
  dpi: number;
};

⚡ Performance

Tested on Apple Silicon (M4) against the included fixture PDFs at 300 DPI.

  • @omsimos/pdf-raster: ~0.86 ms/page
  • pdfjs-dist + @napi-rs/canvas: ~5.98 ms/page (~6.9x slower)
  • pdfjs-dist + node-canvas: ~7.19 ms/page (~8.4x slower)

[!NOTE] These are sample local benchmark results, not universal guarantees. Run bun run benchmark in the repository if you want to compare on your own machine.

🌍 Runtime Support

  • Server-side only: Node.js and Bun.
  • Targets: macOS (x64/arm64), Linux (x64/arm64), Windows (x64/arm64).
  • Format Support: png (default), jpeg, webp.

[!CAUTION] This package contains native bindings. It will not work in Browser bundles, React Client Components, or Edge runtimes.

📖 Links