Hi Walter,
Thank you for using Syncfusion
product.
Currently
Essential Pdf doesn’t have any property to get PdfGrid table height, we
have created a workaround to get the solution. We have created
dummy PdfDcocument to get the height of the table.
Please
refer following the code snippet.
//Calculate
the Table Height
PdfLayoutResult result = pdfGrid.Draw(page, new PointF(0, 0));
float height = result.Bounds.Height;
If the element exceeds the page,
pagination is used to proceed it on the next page. We can enable the
pagination by using the Pagination property available in the PdfLayoutType
enumeration. Please refer the following code snippet:
//Create the PdfGird
PdfGrid
pdfGrid = new PdfGrid();
PdfGridLayoutFormat
format = new PdfGridLayoutFormat();
format.Layout=PdfLayoutType.Paginate;
format.Break
= PdfLayoutBreakType.FitElement;
//Draws
the grid in to the page of the PDF document using that layoutformat
pdfGrid.Draw(pdfPage,
new PointF(10,
10),format);
We have attached the sample for
your reference in below links
Sample Link to get PdfGrid Table
Height:
http://www.syncfusion.com/downloads/support/directtrac/general/PdfGridTable1194063503.zip
Sample Link for Page break:
http://www.syncfusion.com/downloads/support/directtrac/general/PdfGridPageBreak1574123688.zip
Please try this and let us know if
you have any further assistance.
Thanks,
Praveen.