PDFKit: Add layout property and fix margin/margins

This commit is contained in:
Dominik Paľo
2016-09-07 16:49:57 +02:00
parent 4c530f28d1
commit 76bb600263
2 changed files with 8 additions and 2 deletions

View File

@@ -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";

4
pdfkit/pdfkit.d.ts vendored
View File

@@ -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;
}