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.
You can use a custom PdfpageEvent to add text or a table or whatever to the footer.
Here is some code that adds a 4 column table to the footer (sorry it’s in C#):
and this is the code that would call the above code: