Socket
Book a DemoInstallSign in
Socket

pdf-table

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdf-table

Generate PDF documents with table.

1.0.2
latest
npmnpm
Version published
Weekly downloads
3
-84.21%
Maintainers
1
Weekly downloads
 
Created
Source

pdf-table

pdf-table helps you to generate PDF documents with table from any NodeJS server. We use PDF Kit under the hood.

Installation

yarn add pdf-table or npm install --save pdf-table

Usage

const pdfTable = require('pdf-table');
module.exports = (req, res) => {
    ...
    pdfTable({
    heading: 'Hello World!',
    columnHeaders: ['Sl. No', 'Name'],
    rows: [[1, 'Jane Doe'], [2, 'John Doe']],
    pdfName: 'Names',
    footer: 'This is a sample doc',
    res
  });
}

You need to pass a res parameter to the config. This is your HTTP response object. pdf-table will attach the generated PDF file to this res object.

Keywords

pdf

FAQs

Package last updated on 23 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.