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

@revolist/revogrid-pdf-export

v1.0.3

Published

Lightweight pdfmake export plugin for RevoGrid

Readme

RevoGrid PDF Export preview

@revolist/revogrid-pdf-export is built for teams that need a practical PDF export button without bringing in a heavy reporting stack. It reads visible RevoGrid data, preserves column headers, respects trimmed or filtered rows, and creates a simple pdfmake document definition that is ready to download, preview, or customize.

Why Use It

  • Lightweight client-side PDF export for RevoGrid.
  • Works with the standard RevoGrid plugin API.
  • Exports visible rows and visible columns.
  • Supports grouped column headers.
  • Lets you download a PDF, return a browser Blob, or access the pdfmake document definition.
  • Provides a cancelable beforepdfexport hook for last-mile customization.
  • Keeps the first version intentionally focused: fast to adopt, easy to understand, and simple to extend.

Install

npm install @revolist/revogrid-pdf-export

Quick Start

import { ExportPdfPlugin } from '@revolist/revogrid-pdf-export';

grid.plugins = [ExportPdfPlugin];

const plugins = await grid.getPlugins();
const pdf = plugins.find(plugin => plugin instanceof ExportPdfPlugin);

await pdf?.exportPdf({
  filename: 'orders.pdf',
  title: 'Orders',
});

API

exportPdf(options?)

Creates and downloads a PDF file.

await pdf.exportPdf({
  filename: 'orders.pdf',
  title: 'Orders Report',
});

exportBlob(options?)

Creates a PDF and returns it as a browser Blob. Use this when you want to upload, preview, or handle the file yourself.

const blob = await pdf.exportBlob({
  title: 'Orders Report',
});

getDocumentDefinition(options?)

Returns the pdfmake document definition before a PDF is created. This is useful when you want full control over rendering.

const definition = await pdf.getDocumentDefinition({
  pageOrientation: 'portrait',
});

Options

| Option | Type | Default | Description | | --- | --- | --- | --- | | filename | string | revogrid-export.pdf | Download filename. .pdf is added automatically when omitted. | | title | string | RevoGrid Export | Title shown above the exported table. | | pageOrientation | 'portrait' \| 'landscape' | landscape | PDF page orientation. | | includeColumnHeaders | boolean | true | Includes the column header row. | | includeGroupHeaders | boolean | true | Includes grouped column header rows when present. | | maxRows | number | unlimited | Limits exported data rows. | | tableLayout | string | lightHorizontalLines | pdfmake table layout name. |

Customization

The plugin emits a cancelable beforepdfexport event with { data, documentDefinition, options }.

Use it to adjust the pdfmake document definition, add metadata, change styles, or stop the export.

grid.addEventListener('beforepdfexport', event => {
  event.detail.documentDefinition.info = {
    title: 'Orders Report',
    subject: 'Monthly order export',
  };

  event.detail.documentDefinition.footer = currentPage => ({
    text: `Page ${currentPage}`,
    alignment: 'center',
    fontSize: 8,
  });
});

Call event.preventDefault() to cancel the export.

What Gets Exported

The plugin focuses on data, not pixel-perfect rendering. It exports:

  • visible row data
  • visible columns
  • column names
  • grouped column headers
  • filtered or trimmed grid state through RevoGrid's visible source APIs

It does not attempt to reproduce custom cell renderers, DOM styling, images, row headers, pinned layout visuals, or editor UI. This keeps the plugin small and predictable.

Frameworks

The plugin is framework-agnostic. Use it anywhere you can pass RevoGrid plugins:

Links

License

MIT