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

pdfkit-table-ts

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdfkit-table-ts - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

16

lib/index.js

@@ -322,3 +322,2 @@ "use strict";

if (this.calcLimitCellOnPage(this.y, calc)) {
console.log('calcLimitCellOnPage');
this.doNotCreateHeader = true;

@@ -386,3 +385,2 @@ yield this.addPageAsync();

try {
console.log('Start Header');
const { top, right, left } = Object(this.pdfkitTableCache.options.padding);

@@ -397,3 +395,2 @@ let colIndex;

const err = 'CRAZY! This a big text on cell';
console.log(err);
this.logg(err);

@@ -436,3 +433,2 @@ }

yield ((_b = (_a = this.pdfkitTableCache.options) === null || _a === void 0 ? void 0 : _a.prepareRow) === null || _b === void 0 ? void 0 : _b.call(_a, null));
console.log('Start Header');
resolve();

@@ -475,3 +471,2 @@ }

if (haveLongText || this.calcLimitCellOnPage(this.positionY, this.rowHeight)) {
console.log('AddPage calc', rowIndex);
yield this.addPageAsync();

@@ -488,3 +483,2 @@ yield this.createHeader();

const { fitValue, fitHeight } = Object(lt);
console.log('Entrou', this.rowHeight, fitHeight, fitValue.substring(0, 2));
text = fitValue;

@@ -499,3 +493,2 @@ this.rowHeight = fitHeight;

(_d = (_c = this.pdfkitTableCache.options) === null || _c === void 0 ? void 0 : _c.prepareRow) === null || _d === void 0 ? void 0 : _d.call(_c, elm, colIndex, rowIndex, rectRow, rectCell);
console.log('text', rowIndex, text);
this.text(text, this.columnPositions[colIndex] + left + padding.left, this.positionY + top + padding.top - distance, {

@@ -636,3 +629,2 @@ width: this.columnSizes[colIndex] - (left + right) - (padding.left + padding.right),

if (preventLongText) {
console.log('AAAA', heightCompute, height);
if (heightCompute > this.pdfkitTableCache.safelyPageHeight) {

@@ -645,3 +637,2 @@ haveLongText = true;

let fitValue = '';
console.log('BBBB', fitHeight, safeHeight, percent);
let maxLoop = 14;

@@ -658,5 +649,3 @@ for (let ilen = 0; ilen < maxLoop; ilen++) {

heightComputeFit += (padding.top + padding.bottom);
console.log('>>', heightComputeFit, fitHeight, safeHeight);
if (heightComputeFit < fitHeight) {
console.log('no break', fitValueTest);
fitValue = fitValueTest;

@@ -666,3 +655,2 @@ fitHeight = heightComputeFit;

else {
console.log('break');
ilen = maxLoop;

@@ -734,6 +722,4 @@ }

if (preventLongText) {
console.log('preventLongText');
if (heightCompute > this.pdfkitTableCache.safelyPageHeight) {
haveLongText = true;
console.log('haveLongText');
let safeHeight = this.pdfkitTableCache.safelyPageHeight - this.headerHeight - (this.pdfkitTableCache.distanceCorrection * 4);

@@ -757,3 +743,2 @@ let percent = heightCompute / (safeHeight) + 0.01;

fitValue = fitValueTest;
console.log('E', fitValue);
}

@@ -821,3 +806,2 @@ else {

this.headerHeight;
console.log('headerHeightAndFirstLineAndTitleCalc', this.headerHeightAndFirstLineAndTitleCalc);
resolve(this.headerHeightAndFirstLineAndTitleCalc);

@@ -824,0 +808,0 @@ return;

4

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

@@ -12,3 +12,3 @@ "main": "lib/index.js",

},
"repository": "git+https://github.com/natancabral/pdfkit-table.git",
"repository": "git+https://github.com/natancabral/pdfkit-table-ts.git",
"author": "natancabral",

@@ -15,0 +15,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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