Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.86 to 0.1.87

27

index.js

@@ -78,14 +78,16 @@ // jshint esversion: 6

options.hideHeader || (options.hideHeader = false);
options.padding || (options.padding = 0);
options.columnsSize || (options.columnsSize = []);
options.addPage || (options.addPage = false);
options.absolutePosition || (options.absolutePosition = false);
options.absolutePosition || (options.absolutePosition = false);
// divider lines
options.divider || (options.divider = {});
options.divider.header || (options.divider.header = {disabled: false, width: undefined, opacity: undefined});
options.divider.horizontal || (options.divider.horizontal = {disabled: false, width: undefined, opacity: undefined});
options.divider.vertical || (options.divider.vertical = {disabled: true, width: undefined, opacity: undefined});
options.divider.header || (options.divider.header = { disabled: false, width: undefined, opacity: undefined });
options.divider.horizontal || (options.divider.horizontal = { disabled: false, width: undefined, opacity: undefined });
options.divider.vertical || (options.divider.vertical = { disabled: true, width: undefined, opacity: undefined });
if(!table.headers.length) throw new Error('Headers not defined');
if(!table.headers.length) throw new Error('Headers not defined. Use options: hideHeader to hide.');

@@ -506,3 +508,3 @@ if(options.useSafelyMarginBottom === undefined) options.useSafelyMarginBottom = true;

if(table.headers.length > 0) {
if(!options.hideHeader && table.headers.length > 0) {

@@ -621,7 +623,10 @@ // simple header

// Refresh the y coordinate of the bottom of the headers row
rowBottomY = Math.max(startY + computeRowHeight(table.headers), rowBottomY);
// Separation line between headers and rows
separationsRow('header', startX, rowBottomY);
if(!options.hideHeader) {
// Refresh the y coordinate of the bottom of the headers row
rowBottomY = Math.max(startY + computeRowHeight(table.headers), rowBottomY);
// Separation line between headers and rows
separationsRow('header', startX, rowBottomY);
} else {
rowBottomY = startY;
}

@@ -628,0 +633,0 @@ };

{
"name": "pdfkit-table",
"version": "0.1.86",
"version": "0.1.87",
"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",

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

| **addPage** | <code>Boolean</code> | false | add table on new page |
| **hideHeader** | <code>Boolean</code> | false | hide header |
| **prepareHeader** | <code>Function</code> | Function | () |

@@ -388,2 +389,12 @@ | **prepareRow** | <code>Function</code> | Function | (row, indexColumn, indexRow, rectRow, rectCell) => {} |

### 0.1.87
- Add options hideHeader
- Thanks Ville ***@VilleKoo***
```js
options: {
hideHeader: true,
}
```
### 0.1.83

@@ -390,0 +401,0 @@

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