TPDFImagePlacementArray
Data types, content stream editing
Description
TPDFImagePlacementArray is a dynamic array of TPDFImagePlacement records returned by EnumImagePlacements. It holds one entry for every Do instruction in the program, in instruction order, and each entry records the XObject resource name, the instruction index and the placement rectangle.
The rectangle comes from mapping the four corners of the image's 1x1 unit square through the CTM in force at the Do and taking the axis-aligned bounds of the mapped points, so a rotated or sheared CTM still yields an enclosing rectangle in default user space with a bottom-left origin.
Syntax
Delphi
TPDFImagePlacementArray = Array Of TPDFImagePlacement;Remarks
Placements are geometric only: the enumeration reports every Do without resolving the resource dictionary, so callers match XObjectName against /Resources/XObject to tell an image from a form or an unresolved name.
An entry whose XObjectName is empty means the Do operand was missing or was not a name.
InstructionIndex is the same zero-based position used by TPDFContentProgram.Item, so a placement names the exact Do instruction a caller can inspect or delete.
The function returns a Nil array when the program contains no Do instructions.
See also
EnumImagePlacements, TPDFImagePlacement, TPDFContentProgram, FindImages, FindInstructionsInRect