TPDFContentInstruction

Content stream editing

Description

TPDFContentInstruction (unit Lib\PDFlibContentModel.pas) is one element of a TPDFContentProgram: it pairs a PDF content operator with its decoded operand objects and, for inline images, the verbatim BI..EI source

Syntax

Delphi

TPDFContentInstruction = Class
  Public
    Op: TPDFContentOperator;
    OpName: AnsiString;
    Operands: Array Of TPDFObject;
    RawInlineImage: AnsiString;
    Function OperandCount: Integer;
  End;

Key members

OpThe parsed operator token as a TPDFContentOperator enum value
OpNameThe raw operator token; carries unknown operators (for example vendor extensions inside BX/EX) through a parse/emit round trip unchanged
OperandsOperand objects in operator order, owned by the program's private object structure rather than by the instruction
RawInlineImageVerbatim BI..EI source when Op is coBeginImage
OperandCountNumber of operands in Operands

Remarks

Read instructions through the program's default Item property, inspect operands with OperandText, and replace single operands with SetOperand

See also

TPDFContentProgram, Item, OperandText, SetOperand, InstructionGroup