Free Support Forum - aspose.com

Get table origin coordinates inquiry

Hello,


We generate PDF document using “Generator” API. We create a section and fill it in with a bunch of paragraphs. A paragraph can be text, image, table etc. I wonder if there is any way to get a table’s left top point coordinates after (or before) we add the table to a section. We need to identify if a table would be split.

In your article (http://www.aspose.com/docs/display/pdfnet/How+to+++Figure+out+if+the+table+will+break+in+current+page)
you consider only one page and do not take into account that a table may be placed after many other paragraphs which may increase the pages count.

Please advise.

Hi Dmitry,


Thanks for using our API’s.

I am afraid currently Aspose.Pdf for .NET does not support the feature to manipulate existing tables in PDF file, so I am afraid currently its not supported to determine the Top-Left position of table. However for the sake of implementation, I have logged this
requirement in our issue tracking system under New Features list as PDFNEWNET-36802.
We will further investigate this requirement in details and will keep you
updated on the status of a correction.

We apologize for your inconvenience.

The issues you have found earlier (filed as PDFNEWNET-36802) have been fixed in Aspose.Pdf for .NET 10.6.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
aspose.notifier:

The issues you have found earlier (filed as PDFNEWNET-36802) have been fixed in Aspose.Pdf for .NET 10.6.0.



In new version i see TableAdsorber visitor but do not see how to use it. The pages does not have the overload for this visitor (see the picture).
Please advise.

Hi Dmitry,


Please try using following code snippet.

[C#]

Document pdfDocument = new Document(inFile);<o:p></o:p>

// Create TableAbsorber object to find tables

TableAbsorber absorber = new TableAbsorber();

// Visit first page with absorber

absorber.Visit(pdfDocument.Pages[1]);

// Get access to first table on page, their first cell and text fragments in it

TextFragment fragment = absorber.TableList[0].RowList[0].CellList[0].TextFragments[1];

// Change text of the first text fragment in the cell

fragment.Text = "hi world";

pdfDocument.Save(outFile);