NodeJS and PDFKit: how to make first page to be landscape?
So it was quite obvious:
var doc = new PDFDocument(
{
layout : 'landscape'
}
);
You can disable autoFirstPage
const doc = new PDFDocument({ autoFirstPage: false });
doc.addPage({
size: 'LEGAL',
layout: 'landscape'
});