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.48 to 0.1.49

21

index.js

@@ -82,3 +82,3 @@ // jshint esversion: 6

const maxY = this.page.height - (this.page.margins.bottom + 5);
const maxY = this.page.height - (this.page.margins.top + this.page.margins.bottom);

@@ -217,3 +217,3 @@ let startX = options.x || this.x || this.page.margins.left;

let result = 0;
// if row is object, content with property and options

@@ -241,2 +241,4 @@ if( !Array.isArray(row) && typeof row === 'object' && !row.hasOwnProperty('property') ){

text = String(text).replace('bold:','');
// calc

@@ -326,13 +328,10 @@ // calc height size of string

let rowHeight = computeRowHeight(table.headers);
let lastPosition = 0; // x position head
// Check to have enough room for header and first rows. default 3
if (startY + 2 * computeRowHeight(table.headers) > maxY) {
this.addPage();
}
// if (startY + 2 * rowHeight > maxY) this.addPage();
let lastPosition = 0; // x position head
if(table.headers && table.headers.length > 0){
let rowHeight = computeRowHeight(table.headers);
if(typeof table.headers[0] === 'string') {

@@ -476,3 +475,3 @@

// else this.addPage();
startY + 2 * rowHeight >= maxY && this.addPage();
if(startY + 2 * rowHeight >= maxY) this.addPage();
startY = rowBottomY + columnSpacing + rowDistance; // 0.5 is spacing rows

@@ -591,3 +590,3 @@

// For safety, consider 3 rows margin instead of just one
// if (startY + 2 * rowHeight < maxY) startY = rowBottomY + columnSpacing + rowDistance; // 0.5 is spacing rows
// if (startY + 3 * rowHeight < maxY) startY = rowBottomY + columnSpacing + rowDistance; // 0.5 is spacing rows
// else this.addPage();

@@ -594,0 +593,0 @@ if(startY + 2 * rowHeight >= maxY) this.addPage();

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

@@ -371,2 +371,6 @@ # pdfkit-table

### 0.1.49
+ Max size age
### 0.1.48

@@ -373,0 +377,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