Search for placeholders on a page or page level. Placeholders are defined by their placeholderID and must be linked.
If a frame list is passed, unlinked objects are also collected.
If unlinked placeholders should also be included in the result list, please use the collect_any function.
The search results can be sorted by row or column.
The function can be used to find the placeholder furthest in a specified page corner.
In this case, the result list contains a maximum of one result.
The distance to a corner is the sum of the X and Y value of the corresponding frame corner : Left upper side corner - top left of the frame, right upper side corner - top right of the frame.
If two frames have the same distance, the higher (or lower) frame is used.
In the picture the red frame with this distance definition is closest to the upper left side corner.
If it is removed (or contains a placeholder that should not be used), the green frame wins. (Green and blue have the same distance to the corner, but green is higher).
The orange frame is not found.
It is the highest, but unfortunately it is also far to the right (and that’s never good anyway).
By default, the XY coordinates of text placeholders are also calculated.
These values are always in points relative to the upper left corner of the frame.
Please note that in this case, placeholders that are completely or partially overset will not be found.
If you also want to collect placeholders of the overset, the optional list of placeholders must be terminated with .0,0, see the optional parameters in the last line of the parameter table.
document (None | CDocument) –
Collect links in this document only.
pages (list[int]) –
List of 0-based page indices to restrict collecting to.
For InDesign Server and comet_pdf the current page is not defined
frames (list[CFrame]) –
List of frames to restrict collecting to.
List of layers to restrict collecting to.
The parameter type can be:
When the parameter is
CLayer ], all layers must belong to this document.
placeholderIDs (list[int]) –
List of placeholderIDs to restrict collecting to.
edge (int) –
Find all placeholders or placeholder of a specified corner.
One of Link first selectors
sort (int) –
How to sort the result list.
One of Link sorting
calcCoords (bool) – Calculate text placeholder coordinates?
unlinked (bool) – Include unlinked placeholders aswell?
- Return type