How to refine output page size in LitePDF?

To refine output page size, you could pass the page width and page height (in pixels) to NewPage() method.
To get common used page size (like A4), you could call GetPaperWidth() and GetPaperHeight() methods like follows.
litepdf.NewPage(litepdf.GetPaperWidth(”A4″), litepdf.GetPaperHeight(”A4″));
Please see our online documents for more detail.

To get uncommon used page size, you could just convert mm to inches (1 inch = 25.4mm), and then convert inches to pixels (1 inch = 72px).
210mm = (210 / 25.4 * 72)px = 595px

Leave a Reply

You must be logged in to post a comment.