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.39 to 0.1.40

35

index.js

@@ -74,3 +74,3 @@ "use strict";

const columnContainerWidth = usableWidth / columnCount;
let columnContainerWidth = usableWidth / columnCount;
const columnWidth = columnContainerWidth - columnSpacing;

@@ -236,8 +236,18 @@ const maxY = this.page.height - this.page.margins.bottom;

// background header
// addBackground( startX, startY - 5, 100, rowHeight + rowSpacing );
// we have columnSizes[] complete
if( columnIsDefined ){
// sum columns sizes
columnContainerWidth = columnSizes.reduce((acc, curr, index ) => acc + curr, 0);
console.log(columnContainerWidth);
// background header
const rectRow = {
x: startX,
y: startY - 5,
width: columnContainerWidth,
height: rowHeight + rowSpacing,
}
this.addBackground( rectRow );
lastPosition = startX;

@@ -256,2 +266,11 @@ // print headers

// background header
const rectRow = {
x: startX,
y: startY - 5,
width: columnContainerWidth * table.headers.length - 5,
height: rowHeight + rowSpacing,
}
this.addBackground( rectRow );
// print headers

@@ -285,3 +304,9 @@ table.headers.forEach((header, i) => {

// background header
// addBackground( lastPosition, startY - 5, width - 0, rowHeight + 3, '#EEE', 1 );
const rectRow = {
x: lastPosition,
y: startY - 5,
width: width,
height: rowHeight + rowSpacing,
}
this.addBackground( rectRow );

@@ -288,0 +313,0 @@ // write

2

package.json
{
"name": "pdfkit-table",
"version": "0.1.39",
"version": "0.1.40",
"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",

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