Is it possible to right align text using LitePDF?
Monday, July 21st, 2008To draw right-aligned text, you could combine the SetHorizontalAlign() and DrawTextInBox() functions. Please refer to LitePDF documentation for detains.
To draw right-aligned text, you could combine the SetHorizontalAlign() and DrawTextInBox() functions. Please refer to LitePDF documentation for detains.
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