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

@techhspyder/pdfbridge-node

v1.1.1

Published

The official Node.js SDK for the PDFBridge API. Generate pixel-perfect PDFs from HTML/URLs.

Readme

@techhspyder/pdfbridge-node

The official Node.js SDK for PDFBridge - Generate pixel-perfect PDFs from HTML/URLs with advanced AI and security features.

Installation

npm install @techhspyder/pdfbridge-node
# or
yarn add @techhspyder/pdfbridge-node
# or
pnpm add @techhspyder/pdfbridge-node

Setup

Initialize the client with your API key from the dashboard:

import { PDFBridge } from "@techhspyder/pdfbridge-node";

const pdf = new PDFBridge({
  apiKey: process.env.PDFBRIDGE_API_KEY, // Starts with pk_live_ or pk_test_
});

Quick Start

1. Simple URL to PDF

Generate a PDF asynchronously. You will receive a `jobId` representing the background queued task.

const response = await pdf.generate({
  url: "https://example.com/invoice/123",
});
console.log(response.jobId);

2. Ghost Mode Rendering (Enterprise)

Bypass S3 bucket storage entirely. The rendered PDF is piped directly back to you as an `ArrayBuffer`.

const buffer = await pdf.generate({
  html: "<h1>Super Secret Financial Report</h1>",
  ghostMode: true, // Requires Enterprise/Pro plan
});

// Optionally write the buffer to your own storage
import fs from "fs/promises";
await fs.writeFile("report.pdf", Buffer.from(buffer as ArrayBuffer));

3. Smart Templates & Tailwind

Inject arbitrary variables into saved templates and compile Tailwind classes on the fly.

const response = await pdf.generate({
  templateId: "tmpl_9u2j34...",
  tailwind: true,
  variables: {
    customer_name: "Acme Corp",
    total_due: "$5,000.00",
  },
});

4. AI Data Extraction

Extract structured JSON (vendors, line items, totals) from any existing PDF file. Works natively with buffers or file paths.

const response = await pdf.extract("invoice_scan.pdf", {
  filename: "processed_invoice.pdf"
});

// Or extract and poll until completion
const job = await pdf.extractAndWait(buffer);
console.log(job.aiMetadata.vendorName); // "Acme Corp"

5. Normalize & Process (Closed-Loop)

Convert messy legacy PDFs into crisp, branded professional documents while extracting data in one atomic workflow.

const response = await pdf.normalizeInvoice({
  file: buffer,
  templateId: "branded_invoice_v2",
  tailwind: true
});

6. Bulk Generation & Webhooks

Convert up to 1,000 documents simultaneously.

const response = await pdf.generateBulk({
  webhookUrl: "https://your-api.com/pdf-webhook",
  jobs: [
    { url: "https://...", filename: "doc1.pdf" },
    { url: "https://...", filename: "doc2.pdf" },
  ],
});

Security & Verification

We recommend verifying webhook payloads using our built-in utility to ensure requests are authentic:

import { PDFBridge } from "@techhspyder/pdfbridge-node";

// In your Express/Next.js route
const isValid = await PDFBridge.verifyWebhookSignature(
  JSON.stringify(req.body),
  req.headers["x-pdfbridge-signature"] as string,
  process.env.PDFBRIDGE_WEBHOOK_SECRET
);