TPDFImagePlacement

Content stream editing

Description

TPDFImagePlacement (unit Lib\PDFlibContentModel.pas, added in v3.182.0) is one image XObject placement as observed in the content stream; EnumImagePlacements returns the placements in instruction order

Syntax

Delphi

TPDFImagePlacement = Record
  XObjectName: AnsiString;
  InstructionIndex: Integer;
  MinX, MinY, MaxX, MaxY: Double;
End;

Key members

XObjectNameThe /XObject resource key (for example /Im0), letting the caller match each Do back to a /Resources/XObject entry
InstructionIndexZero-based position of the Do operator in the parsed program
MinX, MinY, MaxX, MaxYThe placement rectangle in default user space (bottom-left origin): the CTM active at the Do maps the image's 1x1 unit square onto this rectangle

Remarks

The walk tracks the CTM through cm and q/Q before each Do, matching how the image would be painted on the page

See also

EnumImagePlacements, TPDFContentProgram, FindImages, FindInstructionsInRect