Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Commit

Permalink
fix if not defined pageSize
Browse files Browse the repository at this point in the history
  • Loading branch information
liborm85 committed Jan 15, 2017
1 parent 2d81ac3 commit 7621362
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ PdfPrinter.prototype.createPdfKitDocument = function (docDefinition, options) {
options = options || {};

// if pageSize.height is set to auto, set the height to infinity so there are no page breaks.
if (docDefinition.pageSize.height === 'auto') {
if (docDefinition.pageSize && docDefinition.pageSize.height === 'auto') {
docDefinition.pageSize.height = Infinity;
}

Expand Down

0 comments on commit 7621362

Please sign in to comment.