Skip to content
Open
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.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@ class PDFDocumentWithTables extends PDFDocument {
}

// 24.1 is height calc title + subtitle
titleHeight = !lockAddTitles ? 24.1 : 0;
titleHeight = ((title || subtitle) && !lockAddTitles ? 24.1 : 0);
// calc if header + first line fit on last page
const calc = startY + titleHeight + firstLineHeight + this.headerHeight + safelyMarginBottom// * 1.3;
const calc = startY + titleHeight + firstLineHeight + headerHeight + safelyMarginBottom;// * 1.3;

// content is big text (crazy!)
if(firstLineHeight > maxY) {
Expand Down