From a7129c53ee04301e731cf3627f75b5073d5b839d Mon Sep 17 00:00:00 2001 From: GitLab CI/CD <> Date: Mon, 28 Nov 2022 10:24:11 +0100 Subject: [PATCH 1/4] correction in test to detect new page --- index.d.ts | 4 ++-- index.js | 3 ++- package.json | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index ab0684d..1e62623 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,4 @@ -declare module 'pdfkit-table' +declare module '@feamzy/pdfkit-table' { import PDFDocument from 'pdfkit'; @@ -96,4 +96,4 @@ declare module 'pdfkit-table' // export = PDFDocumentWithTables; export default PDFDocumentWithTables; -} \ No newline at end of file +} diff --git a/index.js b/index.js index 6344638..2fb5bfa 100644 --- a/index.js +++ b/index.js @@ -657,7 +657,8 @@ class PDFDocumentWithTables extends PDFDocument { // For safety, consider 3 rows margin instead of just one // if (startY + 2 * rowHeight < maxY) startY = rowBottomY + columnSpacing + rowDistance; // 0.5 is spacing rows // else this.emitter.emit('addPage'); //this.addPage(); - if(options.useSafelyMarginBottom && this.y + safelyMarginBottom + rowHeight >= maxY && !lockAddPage) onFirePageAdded(); // this.emitter.emit('addPage'); //this.addPage(); + //console.log("startY="+startY+", rowBottomY="+rowBottomY+", this.y="+this.y ) + if(options.useSafelyMarginBottom && rowBottomY + safelyMarginBottom + rowHeight >= maxY && !lockAddPage) onFirePageAdded(); // this.emitter.emit('addPage'); //this.addPage(); // calc position startY = rowBottomY + columnSpacing + rowDistance; // 0.5 is spacing rows diff --git a/package.json b/package.json index 9a9438f..fb831c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "pdfkit-table", - "version": "0.1.98", + "name": "@feamzy/pdfkit-table", + "version": "0.1.100", "description": "PdfKit Table. Helps to draw informations in simple tables using pdfkit. #server-side. Generate pdf tables with javascript (PDFKIT plugin) ", "main": "index.js", "types": "index.d.ts", From 1adadf357a1c9e6754262bef2dc1b05b1db1e805 Mon Sep 17 00:00:00 2001 From: GitLab CI/CD <> Date: Mon, 28 Nov 2022 10:24:41 +0100 Subject: [PATCH 2/4] correction in test to detect new page --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb831c9..ad82c4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@feamzy/pdfkit-table", - "version": "0.1.100", + "version": "0.1.101", "description": "PdfKit Table. Helps to draw informations in simple tables using pdfkit. #server-side. Generate pdf tables with javascript (PDFKIT plugin) ", "main": "index.js", "types": "index.d.ts", From 3ed48b4d101a88b4224fdf02700c5417b6c2c9e3 Mon Sep 17 00:00:00 2001 From: simon-feamzy <56093718+simon-feamzy@users.noreply.github.com> Date: Mon, 28 Nov 2022 10:28:34 +0100 Subject: [PATCH 3/4] revert to pdfkit-table package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ad82c4c..7878bf2 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@feamzy/pdfkit-table", + "name": "pdfkit-table", "version": "0.1.101", "description": "PdfKit Table. Helps to draw informations in simple tables using pdfkit. #server-side. Generate pdf tables with javascript (PDFKIT plugin) ", "main": "index.js", From f42da84c29f3e170a92ef44d0337a7391ae08f15 Mon Sep 17 00:00:00 2001 From: simon-feamzy <56093718+simon-feamzy@users.noreply.github.com> Date: Mon, 28 Nov 2022 10:29:12 +0100 Subject: [PATCH 4/4] revert to pdfkit-table package --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 1e62623..fcc0333 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,4 @@ -declare module '@feamzy/pdfkit-table' +declare module 'pdfkit-table' { import PDFDocument from 'pdfkit';