GetTextRuns

Content stream editing

Description

Enumerates the text-showing instructions of the program (Tj, TJ, ' and ") together with the font resource and font size active at each one

Syntax

Delphi

Function TPDFContentProgram.GetTextRuns: TPDFTextRunArray;

Return values

A TPDFTextRunArray with one run per text-showing instruction, each carrying the font resource and size active where that instruction paints text

Remarks

The font resource and size reported for a run come from the Tf operator in effect at that instruction; the walk tracks Tf through q/Q save and restore

Use ReplaceTextRun to replace the shown text of a run, or FindInstructionsInRect to locate instructions by their painted area

See also

TPDFContentProgram, GetGraphicsState, FindInstructionsInRect, ReplaceTextRun, TPDFTextRun