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

mioffice-pdf-utils

v1.0.0

Published

Lightweight PDF utilities for Node.js and the browser — merge, split, extract pages, get metadata. Zero native dependencies.

Readme

@mioffice/pdf-utils

Lightweight PDF utilities for Node.js and the browser. Merge, split, extract, rotate, reorder pages, and read/write metadata — all with zero native dependencies.

Built by MiOffice.ai — the AI office suite where files never leave your browser.

Install

npm install @mioffice/pdf-utils

Usage

import { mergePdfs, splitPdf, extractPages, getPdfMetadata, rotatePdf } from '@mioffice/pdf-utils';
import { readFileSync, writeFileSync } from 'fs';

// Merge multiple PDFs
const merged = await mergePdfs([
  readFileSync('doc1.pdf'),
  readFileSync('doc2.pdf'),
]);
writeFileSync('merged.pdf', merged);

// Split a PDF into individual pages
const pages = await splitPdf(readFileSync('document.pdf'));
pages.forEach((page, i) => writeFileSync(`page-${i + 1}.pdf`, page));

// Extract specific pages (0-indexed)
const extracted = await extractPages(readFileSync('document.pdf'), [0, 2, 4]);
writeFileSync('extracted.pdf', extracted);

// Rotate all pages
const rotated = await rotatePdf(readFileSync('document.pdf'), 90);
writeFileSync('rotated.pdf', rotated);

// Get metadata
const meta = await getPdfMetadata(readFileSync('document.pdf'));
console.log(meta);
// { title: '...', author: '...', pageCount: 12, pageSizes: [...] }

API

| Function | Description | |----------|-------------| | mergePdfs(pdfs) | Combine multiple PDFs into one | | splitPdf(pdf) | Split a PDF into single-page PDFs | | extractPages(pdf, indices) | Extract specific pages (0-indexed) | | removePages(pdf, indices) | Remove specific pages | | reorderPages(pdf, newOrder) | Reorder pages by index | | rotatePdf(pdf, degrees) | Rotate all pages (90, 180, 270) | | getPdfMetadata(pdf) | Read title, author, page count, sizes | | setPdfMetadata(pdf, meta) | Write title, author, subject, etc. |

All functions accept Uint8Array | ArrayBuffer and return Uint8Array.

Browser Usage

Works in any modern browser. No Node.js-specific APIs used.

<script type="module">
  import { mergePdfs } from 'https://esm.sh/@mioffice/pdf-utils';

  const file1 = await fetch('/doc1.pdf').then(r => r.arrayBuffer());
  const file2 = await fetch('/doc2.pdf').then(r => r.arrayBuffer());
  const merged = await mergePdfs([new Uint8Array(file1), new Uint8Array(file2)]);
</script>

Why This Exists

MiOffice.ai provides 67+ file processing tools that run 100% in your browser — no uploads, no signup, no cloud. This package extracts our PDF utilities for developers who need the same capabilities in their own apps.

License

MIT — JSVV SOLS LLC