Copy link to clipboard
Copied
How do I find a table, image in a document and retrieve the corresponding page?
Copy link to clipboard
Copied
Is this a scripting, C++ sdk or UI query please specify?
-Manan
Copy link to clipboard
Copied
It's C++
Copy link to clipboard
Copied
Hi kangs64191518,
I can answer the ExtendScript (JavaScript) case.
Loop the allGraphics array of the table object.
Look for the value of table.allGraphics[n].parentPage.
Notes:
[1] The returned value for parentPage will be null if the the whole image area is on the pasteboard and does not touch the page. Even if the graphic frame holding the image is touching the page parentPage will return null. So you would also want perhaps get the value of:
table.allGraphics[n].parent.parentPage
[2] parentPage could return a valid page object even if the part of the table holding the image is in overset.
So you would also test:
table.allGraphics[n].geometricBounds in a try/catch scenario.
If the graphic is in overset, you'll ger an error.
Regards,
Uwe Laubender
( ACP )