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

@compdfkit_pdf_sdk/webviewer

v2.9.1

Published

ComPDF WebViewer is a JavaScript PDF SDK for **Web** apps that need PDF viewing, annotation, editing, forms, signatures, comparison, and security directly in the browser. For teams building broader **document workflow** products, ComPDF also works with Co

Readme

PDF SDK for Web | View, Annotate, Edit & Render PDFs in the Browser

ComPDF WebViewer is a JavaScript PDF SDK for Web apps that need PDF viewing, annotation, editing, forms, signatures, comparison, and security directly in the browser. For teams building broader document workflow products, ComPDF also works with ComPDF API for Convert, OCR, and Generate workflows.

🚀 Why ComPDF

ComPDF is a practical choice for web teams that need more than a low-level PDF renderer but do not want to build a full document UI stack from scratch.

Why developers use it:

  • Browser rendering: render PDFs directly in the browser with a ready-to-use UI.
  • No backend required for standalone mode: deploy with WebAssembly and keep rendering client-side.
  • SaaS-friendly integration: embed document workflows inside portals, dashboards, CRMs, and customer-facing apps.
  • Framework support: use it with React, Angular, Vue, Next.js, Nuxt.js, and more.
  • Commercial flexibility: standalone and server-backed deployment options for different product needs.

🎬 Live Demo

Try ComPDF in action:

⚡ Quick Start

Requirements: Node.js latest stable, npm-compatible package manager, and a valid ComPDF web license.

1. Install

npm install @compdfkit_pdf_sdk/webviewer

2. Copy the WebViewer assets

cp -r ./node_modules/@compdfkit_pdf_sdk/webviewer/dist ./public/webviewer

3. Initialize the viewer

import WebViewer from '@compdfkit_pdf_sdk/webviewer';

const viewer = document.getElementById('viewer');

WebViewer.init(
  {
    path: '/webviewer',
    pdfUrl: '/webviewer/example/developer_guide_web.pdf',
    license: '<Input your license here>',
  },
  viewer,
).then((instance) => {
  const docViewer = instance.docViewer;

  docViewer.addEvent('documentloaded', () => {
    console.log('document loaded');
  });
});

Standalone deployment runs in the browser, so no backend is required for rendering PDFs.

🧩 Key Features

  • 🌐 Browser PDF Rendering
    Render PDFs with smooth navigation, thumbnails, and a ready-made document UI.
    👉 Use case: SaaS dashboards, customer portals, embedded viewers

  • ✍️ Annotations, Forms & Signatures
    Review, mark up, fill, and sign documents inside the browser.
    👉 Use case: contract workflows, onboarding, collaboration

  • 🛠️ Editing & Document Operations
    Support content editing, page workflows, and document manipulation in web apps.
    👉 Use case: online PDF editors, review platforms, content operations tools

  • 🔐 Security & Comparison
    Add secure document handling and compare PDFs in browser-based workflows.
    👉 Use case: legal review, approval systems, quality control

  • 🧱 Framework-Friendly Integration
    Use one PDF layer across React, Angular, Vue, Next.js, and other frontend stacks.
    👉 Use case: multi-team SaaS platforms and reusable frontend infrastructure

  • 🔄 Convert / OCR / Generate via ComPDF API
    Combine WebViewer with backend document processing when your product needs more than in-browser interaction.
    👉 Use case: invoice extraction, document generation, server-side automation

💡 Use Cases

  • Document Management Systems with browser-based viewing and review
  • PDF Editors embedded in SaaS products
  • Customer Portals for form filling, signatures, and secure document exchange
  • Invoice Processing UIs that preview files in browser before OCR/extraction workflows
  • No-Backend Viewer Scenarios where client-side rendering simplifies deployment

🧪 Code Snippets

Vanilla JavaScript example

import WebViewer from '@compdfkit_pdf_sdk/webviewer';

const element = document.getElementById('viewer');

WebViewer.init(
  {
    path: '/webviewer',
    pdfUrl: '/webviewer/example/developer_guide_web.pdf',
    license: '<Input your license here>',
  },
  element,
).then((instance) => {
  const docViewer = instance.docViewer;

  docViewer.addEvent('documentloaded', () => {
    console.log('ComPDF WebViewer loaded');
  });
});

React example

import { useEffect, useRef } from 'react';
import ComPDFKitViewer from '@compdfkit_pdf_sdk/webviewer';

export default function WebViewerContainer() {
  const containerRef = useRef(null);

  useEffect(() => {
    ComPDFKitViewer.init(
      {
        path: '/',
        pdfUrl: './example/developer_guide_web.pdf',
        license: '<Input your license here>',
      },
      containerRef.current,
    ).then((core) => {
      const docViewer = core.docViewer;

      docViewer.addEvent('documentloaded', async () => {
        console.log('document loaded');
      });
    });
  }, []);

  return (
    <div
      ref={containerRef}
      style={{ width: '100%', height: '100vh', overflow: 'hidden' }}
    />
  );
}

🔗 Documentation & Resources

| Resource | Link | | --- | --- | | Official Docs | https://www.compdf.com/guides/pdf-sdk/web/overview | | Viewer Guide | https://www.compdf.com/guides/pdf-sdk/web/viewer | | GitHub Examples | https://github.com/ComPDFKit/compdfkit-web-example-react | | Demo | https://www.compdf.com/demo/webviewer |

❤️ Engagement

If ComPDF helps your web product ship faster, please ⭐ Star us on GitHub to support the project.

ComPDF is a strong fit for teams that want browser rendering, customizable UI, and a clean upgrade path from PDF viewing to full document workflows.