Get PdfGrid dimensions in loaded document

Hi,

I need create multiples tables in existing pdf.

For draw the first table I do

// Page is PdfLoadedPage
var page = loadedDocument.Pages[i];

// Draw the grid,
pdfGrid.Draw( page.Graphics, initPoint.X, initPoint.Y, _page.Size.Width - 30);


But with this method, I can't get the table dimensions (height) for draw the next table.

Other methods of Draw require a PdfPage, but I haven't this object and I can't convert PdfLoadedPage to PdfPage.

So, what can I do?

Thanks


3 Replies 1 reply marked as answer

GK Gowthamraj Kumar Syncfusion Team May 20, 2021 11:35 AM UTC

Hi Manolo, 
 
At present, we do not have direct support to get the layout result of PdfGrid from existing PDF document.  We can achieve your requirement by calculating the height of rows and headers from the previous table. Based on the calculated height, we can draw the second table in a existing PDF document. We have attached the sample and output document for your reference. Kindly please try the sample on your end and let us know if it is suites your requirement. 
 
 
Please refer the below link for more information, 
 
Please let us know if you need any further assistance with this. 
 
Regards, 
Gowthamraj K 


Marked as answer

MC Manolo Capdevila May 27, 2021 08:51 AM UTC

Thanks.

It works, but it would be good to have the layoutresult in PageLoaded

Thanks


GK Gowthamraj Kumar Syncfusion Team May 28, 2021 11:41 AM UTC

Hi Manolo, 
 
Thank you for your update. We are glad to know that your problem has been solved. 
 
As we said earlier, we do not have direct support to get the layout result of PdfGrid from existing PDF document. And we do not have any immediate plans to implement these support. 
 
Regards, 
Gowthamraj K 


Loader.
Up arrow icon