Copy link to clipboard
Copied
I have a table that runs 500 pages.
Is there a way to identify what page any given row is on? Parent returns the page the table starts on.
Copy link to clipboard
Copied
I could not find a cleaner way to achieve this, however the following seems to work
rowObj.cells[0].insertionPoints[0].parentTextFrames[0].parentPage.name
-Manan
Copy link to clipboard
Copied
That solution works fine, in principle, however, here are two important amendments:
1. If you only need the actual page number, then you could of course use the name, but the "name" can appear multiple times within an InDesign document (different sections). So you have at least to check the section as well. Or you assess the page's "index" and in a second step you find out the actual page number.
2. If the cell overflows, then you don't have a chance to assess any kind of insertion point, baseline etc. simply because this layout information is not present - since not shown on the monitor. What you have to do is to save the "<cell object>.texts[0]" first, then remove it eg using "<cell object>.texts[0].remove()", then assess the insertionPoint[0] plus additional information, and then restore the "<cell object>.texts[0]".