Skip to content

Changing the Document size

Jeremy Woertink edited this page Jan 7, 2015 · 4 revisions

The PDFDocument takes some options when initializing.

var doc = new PDFDocument({
  size: 'legal',
  layout: 'landscape' // default is portrait
});

Other size options include letter, or you can use an array to specify dimensions.

var doc = new PDFDocument({
  layout: 'landscape',
  size: [200, 350] // a smaller document for small badge printers
});
Clone this wiki locally