diff --git a/pdfkit/pdfkit-tests.ts b/pdfkit/pdfkit-tests.ts index a21dfed815dbb5..86d6bc7e2ece86 100644 --- a/pdfkit/pdfkit-tests.ts +++ b/pdfkit/pdfkit-tests.ts @@ -24,7 +24,7 @@ doc.addPage({ }); doc.addPage({ - margin: { + margins: { top: 50, bottom: 50, left: 72, @@ -32,6 +32,10 @@ doc.addPage({ } }); +doc.addPage({ + layout: "landscape" +}); + doc.info.Title = "Sample"; doc.info.Author = "kila Mogrosso"; diff --git a/pdfkit/pdfkit.d.ts b/pdfkit/pdfkit.d.ts index 70836187e281f1..85d53c4462e3c0 100644 --- a/pdfkit/pdfkit.d.ts +++ b/pdfkit/pdfkit.d.ts @@ -231,7 +231,9 @@ declare namespace PDFKit { info?: DocumentInfo; autoFirstPage?: boolean; size?: number[]; - margin?: { top: number; left: number; bottom: number; right: number }|number; + margin?: number; + margins?: { top: number; left: number; bottom: number; right: number }; + layout?: "portrait" | "landscape" bufferPages?: boolean; }