SetOperand

Content stream editing

Description

Replaces one operand of one instruction with an object decoded from content stream source text

Syntax

Delphi

Function TPDFContentProgram.SetOperand(Index, OperandIndex: Integer; Const Source: AnsiString): Boolean;

Parameters

IndexZero-based index of the instruction whose operand is replaced
OperandIndexZero-based index of the operand to replace within the instruction
SourceOperand source text in content stream syntax, for example 0.5, (text), /Name or [ 1 2 ]

Return values

True when the operand is replaced, otherwise false

Remarks

Numeric operands set this way are always written at the program's fixed four-decimal precision, regardless of CanonicalNumbers; use OperandText to serialise an operand back to content stream syntax

See also

OperandText, CanonicalNumbers, Item, TPDFContentProgram