PDF Table with variable page height

I am trying to generate a PDF document from a table of data using the PdfLightTable.

Everything works fine, except on the first n pages I need the table to render with a smaller height so I can insert extra footer data on those first pages.

How can I adjust the table height on a per page basis?

1 Reply

TE Thiruvenkadam E Syncfusion Team September 22, 2009 12:03 PM UTC

Hi Jeremy

Thank you for your interest in Syncfusion products.

PDF Table with variable page height

We can able to create a PDF Table with variable page height by using BeginPageLayout event handler.

Kindly refer the below code snippet.

void table_BeginPageLayout(object sender, BeginPageLayoutEventArgs e)
{
if (document.Pages.IndexOf(e.Page) <= 2)
e.Bounds = new RectangleF(10, 10, 100, 200);
else if ((document.Pages.IndexOf(e.Page) >= 2) && (document.Pages.IndexOf(e.Page) <= 4))
e.Bounds = new RectangleF(10, 10, 100, 100);
else
e.Bounds = new RectangleF(10, 10, 400, 500);
}


Could you please find the sample from the below location and let me know if this helps,

http://files.syncfusion.com/support/PDF.Windows/F90191/Table.zip

Regards,
Thiru

Loader.
Up arrow icon