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

tekivex-pdf

v0.1.2

Published

TekiVex PDF — render React components to pixel-stable PDFs and PNGs without a headless browser. Wraps @react-pdf/renderer with the tekivex-ui design system.

Readme

tekivex-pdf

Preview release. Source-available; published to npm on demand.

Render React components to pixel-stable PDFs and PNGs without a headless browser. Wraps @react-pdf/renderer with the tekivex-ui design system — same naming convention, themed defaults, runs on Vercel/Cloudflare Workers/Lambda.

~1 MB pure-JS dep   vs   ~200 MB Chromium binary (Puppeteer)
~50 ms cold start   vs   2–4 s cold start

Why not Puppeteer

Puppeteer launches a full Chromium and screenshots HTML. It's the most accurate HTML→PDF tool, but:

  • Doesn't fit on Vercel/Cloudflare Workers' default size limits
  • 100–200 MB RAM per render
  • Breaks on Chromium updates and security patches
  • Slow cold-start

For structured documents (biodata, invoice, certificate, resume, ticket, ID card) you don't need a browser. You need a layout engine that handles flexbox, fonts, images, multi-page, and watermarks. That's @react-pdf/renderer. We add the themed component layer on top.

Install

npm install tekivex-pdf @react-pdf/renderer

@react-pdf/renderer is a peer dep — install it explicitly so version bumps stay under your control.

Quick start — invoice

import {
  TkxPDFDocument,
  TkxPDFPage,
  TkxPDFText,
  TkxPDFRow,
  TkxPDFColumn,
  renderToPDF,
} from 'tekivex-pdf';

const buffer = await renderToPDF(
  <TkxPDFDocument>
    <TkxPDFPage size="A4" margin={36}>
      <TkxPDFText size={24} weight="bold">Invoice #1234</TkxPDFText>
      <TkxPDFRow gap={16}>
        <TkxPDFColumn flex={1}>
          <TkxPDFText size={10}>From</TkxPDFText>
          <TkxPDFText size={12} weight="bold">Acme Inc.</TkxPDFText>
        </TkxPDFColumn>
        <TkxPDFColumn flex={1}>
          <TkxPDFText size={10}>To</TkxPDFText>
          <TkxPDFText size={12} weight="bold">Globex Corp.</TkxPDFText>
        </TkxPDFColumn>
      </TkxPDFRow>
    </TkxPDFPage>
  </TkxPDFDocument>
);

// Node:
await fs.writeFile('invoice.pdf', buffer);

// Browser:
const blob = await pdfToBlob(<MyDoc />);
const url = URL.createObjectURL(blob);

Built-in templates

import { BiodataTemplate, InvoiceTemplate } from 'tekivex-pdf';

const buffer = await renderToPDF(
  <BiodataTemplate
    data={{
      name: 'Priya Sharma',
      photoUrl: 'data:image/jpeg;base64,…',
      personal: [
        { label: 'Date of Birth', value: '14 Aug 1998' },
        { label: 'Height', value: '5\'4"' },
      ],
      education: [
        { label: 'Degree', value: 'B.Tech (Computer Science)' },
      ],
      family: [
        { label: 'Father', value: 'Rajesh Sharma' },
      ],
    }}
    watermark="PREVIEW · session-abc123"
  />
);

Watermarks

TkxPDFWatermark adds tiled or single diagonal stamps. Pair with the in-browser TkxWatermark v2 from tekivex-ui so the leak-tracking fingerprint is identical between live preview and downloaded PDF.

<TkxPDFPage>
  <TkxPDFWatermark
    text={['CONFIDENTIAL', `session ${sessionId}`]}
    pattern="tiled"
    opacity={0.07}
  />
  {/* …content… */}
</TkxPDFPage>

Server-side rendering

renderToPDF() returns a Buffer — pipe it to any HTTP response:

// Express / Vercel / Cloudflare
import { renderToPDF, BiodataTemplate } from 'tekivex-pdf';

export default async function handler(req, res) {
  const buffer = await renderToPDF(<BiodataTemplate data={…} />);
  res.setHeader('Content-Type', 'application/pdf');
  res.setHeader('Content-Disposition', 'attachment; filename="biodata.pdf"');
  res.send(buffer);
}

For streaming large documents:

import { renderToPDFStream } from 'tekivex-pdf';
renderToPDFStream(<MyDoc />).pipe(res);

Caveats

  • @react-pdf/renderer supports a subset of CSS (flexbox layout, no position: absolute in flow, limited transforms). For structured documents this is fine.
  • Custom fonts require explicit Font.register(). We'll bundle Noto pre-registrations in a follow-up release.
  • Complex SVGs render fine when authored as React components; raw SVG files need to be inlined.
  • For pixel-perfect web-page screenshots (e.g. capturing a live dashboard), Puppeteer is still the right tool. tekivex-pdf targets generated documents, not screenshots.

Status

This package is preview. The API surface is stable enough to use; we publish to npm on demand once a real consumer hits a workflow that needs it. The source is production-ready in this repo today.

Open an issue and we'll tag a release within 48 hours.