|117587||Nov 12,2014 02:47 PM UTC||Nov 13,2014 12:14 PM UTC||WinForms||1|
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.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:
Sample Link for Page break:
Please try this and let us know if you have any further assistance.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.