Skip to content

Commit

Permalink
PDFKit: Add layout property and fix margin/margins
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikPalo committed Sep 7, 2016
1 parent 4c530f2 commit 76bb600
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pdfkit/pdfkit-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@ doc.addPage({
});

doc.addPage({
margin: {
margins: {
top: 50,
bottom: 50,
left: 72,
right: 72
}
});

doc.addPage({
layout: "landscape"
});

doc.info.Title = "Sample";
doc.info.Author = "kila Mogrosso";

Expand Down
4 changes: 3 additions & 1 deletion pdfkit/pdfkit.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 76bb600

Please sign in to comment.