Socket
Socket
Sign inDemoInstall

pdfkit-table

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdfkit-table - npm Package Compare versions

Comparing version 0.1.76 to 0.1.77

2

package.json
{
"name": "pdfkit-table",
"version": "0.1.76",
"version": "0.1.77",
"description": "PdfKit Table. Helps to draw informations in simple tables using pdfkit. #server-side. Generate pdf tables with javascript (PDFKIT plugin) ",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -26,3 +26,3 @@ <p align="center">

## Install
## Install [<img src="https://github.com/natancabral/pdfkit-table/blob/main/example/npm-tile.png">](https://www.npmjs.com/package/pdfkit-table)

@@ -36,9 +36,11 @@ ```bash

```js
// requires
const fs = require("fs");
const PDFDocument = require("pdfkit-table");
// start pdf document
// create document
let doc = new PDFDocument({ margin: 30, size: 'A4' });
// file name
doc.pipe(fs.createWriteStream("./document.pdf"));
// table

@@ -48,11 +50,8 @@ const table = {

headers: [],
datas: [/* complex data */],
rows: [/* or simple data */],
datas: [ /* complex data */ ],
rows: [ /* or simple data */ ],
}
// options
const options = {};
// callback
const callback = () => {};
// the magic
doc.table( table, options, callback ); // is a Promise to async/await function
doc.table( table, { /* options */ }, () => { /* callback */ } );
// doc.table() is a Promise to async/await function

@@ -59,0 +58,0 @@ // if your run express.js server

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc