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

vikcraft-pdf-editor

v2.1.0

Published

A full-featured browser PDF annotation and editing library built on PDF.js and Fabric.js. Supports drawing, text boxes, stamps, measurements, AI-powered issue detection, undo/redo, and export to annotated PDF.

Readme

vikcraft-pdf-editor

A full-featured browser PDF annotation and editing library — built on PDF.js and Fabric.js.

npm version license

Features

  • Render and paginate PDF documents (via PDF.js)
  • Annotation tools: Pen/freehand, Rectangle, Ellipse, Arrow, Line, Text Box, Stamp, Comment Pin, Cloud, Measurement
  • Category tagging & comment sidebar with search/filter
  • Undo / redo (50-step stack)
  • Export annotations to annotated PDF (all marks baked in at correct positions)
  • Zoom in/out with annotation canvas alignment
  • AI-powered features:
    • 💡 Page hints bar (auto-scans on load)
    • 🔍 Find missing engineering issues
    • 🎯 Review annotation quality
    • 🤖 Per-annotation AI review
  • Right-click context menu with AI review option
  • 6 built-in themes

Install

npm install vikcraft-pdf-editor

Peer dependencies (CDN-loaded by default, or install manually)

npm install pdfjs-dist fabric jspdf

Quick Start

Via <script> tag (browser)

<link rel="stylesheet" href="node_modules/vikcraft-pdf-editor/VikCraftPDFEditor.css">

<!-- Peer dependencies (CDN) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.4.120/pdf.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/5.3.1/fabric.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>

<div id="my-pdf-editor" style="width:100%;height:90vh;"></div>

<script type="module">
  import VikCraftPDFEditor from 'node_modules/vikcraft-pdf-editor/VikCraftPDFEditor.js';

  const editor = new VikCraftPDFEditor('my-pdf-editor', {
    pdfUrl: './document.pdf',
    pdfjsLib:  window.pdfjsLib,
    fabric:    window.fabric,
    jsPDF:     window.jspdf?.jsPDF,
    mode: 'edit',   // 'edit' | 'view'
    currentUser: 'Engineer',
    // ai: { apiKey: 'sk-ant-...' },  // enable AI features
  });
</script>

Via bundler (Vite / Webpack)

import VikCraftPDFEditor from 'vikcraft-pdf-editor';
import 'vikcraft-pdf-editor/VikCraftPDFEditor.css';
import * as pdfjsLib from 'pdfjs-dist';
import * as fabric   from 'fabric';
import { jsPDF }     from 'jspdf';

const editor = new VikCraftPDFEditor('my-pdf-editor', {
  pdfUrl: './document.pdf',
  pdfjsLib, fabric, jsPDF,
});

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | pdfUrl | string | — | URL or path to the PDF file | | pdfjsLib | object | — | Required. PDF.js library object | | fabric | object | — | Required. Fabric.js library object | | jsPDF | class | — | Required. jsPDF constructor | | mode | string | 'edit' | 'edit' or 'view' | | currentUser | string | 'User' | Username shown on annotation cards | | ai | object | null | { apiKey: 'sk-ant-...' } to enable AI features |

API

editor.loadPdf(url)              // Load a new PDF
editor.downloadAnnotatedPdf()    // Export PDF with annotations baked in
editor.getAnnotations()          // → array of all annotation objects
editor.setAnnotations(array)     // Restore saved annotations
editor.setMode('view')           // Switch between 'edit' and 'view'
editor.getCurrentMode()          // → 'edit' | 'view'
editor.on('annotationAdded', fn) // Event listener
editor.destroy()                 // Clean up

CDN

<link rel="stylesheet" href="https://unpkg.com/vikcraft-pdf-editor/VikCraftPDFEditor.css">
<script type="module">
  import VikCraftPDFEditor from 'https://unpkg.com/vikcraft-pdf-editor/VikCraftPDFEditor.js';
</script>

License

MIT © VikCraft Pro