iTextSharp custom paper size

Posted by Morron on Stack Overflow See other posts from Stack Overflow or by Morron
Published on 2010-03-22T15:38:59Z Indexed on 2010/03/22 15:41 UTC
Read the original article Hit count: 2094

Filed under:
|

Hi,

I'm using iTextsharp library to create PDF files. I can declare for A4 Landscape paper like this:

 Dim pdfTable As New PdfPTable(9)
pdfTable.WidthPercentage = 100
Dim pdfDoc As New Document(PageSize.A4.Rotate())

I'm wondering how I can set Height of pdfTable or A4 Height manually. Because there's a lot more margin left at the bottom, and I need to put some text at that margin. Right now, I put a line of text at the bottom, the line's got pushed to the new page.

Q1: How can I override the height of A4 paper provied by iTextsharp?

Q2: How can I create a custom size paper, say Width = 29cm, Height = 22cm?

Thank you.

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about itextsharp