Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare module 'pdfkit-table'
declare module 'pdfkit-table'
{
import PDFDocument from 'pdfkit';

Expand Down Expand Up @@ -96,4 +96,4 @@ declare module 'pdfkit-table'

// export = PDFDocumentWithTables;
export default PDFDocumentWithTables;
}
}
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pdfkit-table",
"version": "0.1.98",
"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",
Expand Down