We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to calculate PdfGrid Table Height

 How to calculate PdfGrid table height

 

Currently Essential Pdf doesn’t provide a property to get the height of a PdfGrid. The code snippets snippets given below explains

 

//Calculate the PdfGrid Table Height

               

 PdfLayoutResult result = pdfGrid.Draw(page, new PointF(0, 0));

 

 float gridHeight = result.Bounds.Height;

 

 MessageBox.Show(“Table Height ”+ gridHeight);

                             

 To set Page Break in PdfGrid

Essential PDF supports the PdfGrid pagination through the PdfGridLayoutFormat class. 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);

 

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

 

 

Article ID: Published Date: Last Revised Date: Platform: Control:
2690 11/18/2014 11/18/2014 Windows Forms PDF
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.