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

@siliph/pdf-engine

v0.3.0

Published

Complete browser-native PDF editing engine — parse, render, merge, split, edit text, fill forms, sign, encrypt, annotate, and export PDFs entirely client-side. No server required. TypeScript-first with tree-shaking support.

Downloads

214

Readme


Install

npm install @siliph/pdf-engine

This is the umbrella package that re-exports everything from the core, UI, and plugin SDK packages. Recommended for most users.

Quick Start

import { mergePdfs, splitPdf, rotate, fillForm, addWatermark, search } from '@siliph/pdf-engine';

// Merge two PDFs
const merged = await mergePdfs([doc1, doc2]);
if (merged.ok) console.log(`${merged.value.getPageCount()} pages`);

// Split by ranges
const parts = await splitPdf(doc, [{ start: 0, end: 4 }, { start: 5, end: 9 }]);

// Rotate page 1 by 90°
const cmd = await rotate(doc, 0, 90);
if (cmd.ok) doc.applyCommand(cmd.value);

// Fill form fields
await fillForm(doc, { name: 'Jane', email: '[email protected]', agree: true });

// Add watermark
await addWatermark(doc, { text: 'DRAFT', opacity: 0.2, rotation: 45 });

// Search text (async generator)
for await (const hit of search(doc, 'total')) {
  console.log(`Page ${hit.pageIndex}, offset ${hit.offset}`);
}

Why Siliph?

| | Siliph | Sejda | Adobe SDK | PDF.js | pdf-lib | |---|---|---|---|---|---| | Runs in browser | ✅ | ❌ | ❌ | ✅ | ✅ | | Edit text in-place | ✅ | ✅ | ✅ | ❌ | ❌ | | Merge/Split | ✅ | ✅ | ✅ | ❌ | ✅ | | Digital signatures | ✅ | ✅ | ✅ | ❌ | ❌ | | AcroForms | ✅ | ✅ | ✅ | Read-only | ✅ | | Encryption | ✅ | ✅ | ✅ | ❌ | ❌ | | Full renderer | ✅ | ❌ | ✅ | ✅ | ❌ | | Tree-shakeable | ✅ | ❌ | ❌ | ❌ | Partial | | Plugin system | ✅ | ❌ | ❌ | ❌ | ❌ | | Zero dependencies | ✅ | ❌ | ❌ | ❌ | ❌ | | MIT license | ✅ | AGPL | Proprietary | Apache | MIT |

All 20 Task Functions

| Function | Description | |----------|-------------| | mergePdfs | Merge multiple documents into one | | splitPdf | Split by page ranges | | splitByBookmarks | Split at bookmark boundaries | | splitBySize | Split into max-size chunks | | extractPages | Extract specific pages | | rotate | Rotate pages (90°/180°/270°) | | crop | Crop (metadata or content clip) | | compress | Remove unused resources | | addWatermark | Add text watermark | | setHeaderFooter | Headers/footers with page numbers | | setMetadata | Set title, author, keywords | | redact | Visual or permanent redaction | | fillForm | Fill AcroForm fields | | search | Full-text search (async generator) | | mixPages | Alternate pages from multiple docs | | addBackPages | Back pages for duplex printing | | setBookmarks | Set document outline | | getBookmarks | Read bookmarks | | pdfToImages | Convert pages to PNG/JPEG |

14 Engines

Parser · Rendering · Font · Text · Image · Annotation · Forms · Security · Page · Export · Search · Selection · Graphics · Validation

Key Capabilities

  • Parsing: Lazy object resolution, XRef streams, brute-force recovery, linearized PDFs
  • Rendering: Canvas2D + OffscreenCanvas Workers, blend modes, transparency groups
  • Fonts: TrueType, Type1, CID, CMap, ToUnicode, glyph LRU cache, Standard 14
  • Text: In-place editing, kerning preservation, RTL/BiDi, selection + clipboard
  • Images: JPEG, JPEG2000, JBIG2, CCITTFax, Flate, SMask compositing
  • Security: RC4, AES-128, AES-256, PKCS#7 digital signatures, permissions
  • Forms: All field types, validation, radio groups, appearance regeneration
  • Export: Incremental save, full save with GC, streaming, Worker offload
  • Accessibility: Screen reader text layer, ARIA, keyboard nav, focus trapping
  • Validation: PDF/A-1b conformance checking

Performance

| Operation | Time | |-----------|------| | Parse 500-page (12MB) | ~85ms | | First page render | ~180ms | | Merge 150 pages | ~45ms | | Full-text search (200pg) | ~120ms | | AES-256 decrypt | ~95ms |

Packages

| Package | Description | |---------|-------------| | @siliph/pdf-engine | Umbrella (this package) | | @siliph/pdf-engine-core | Parser, engines, task API | | @siliph/pdf-engine-ui | Viewport, toolbar, accessibility | | @siliph/pdf-engine-plugin-sdk | Plugin extension system |

Browser Support

Chrome 90+ · Firefox 90+ · Safari 15+ · Edge 90+ · Node.js 18+

Links

License

MIT