TPDFTextRunArray
Data types, content stream editing
Description
TPDFTextRunArray is a dynamic array of TPDFTextRun records returned by GetTextRuns. Each element corresponds to one text-showing instruction (Tj, TJ, ' or ") and carries the shown bytes, the font resource and size active at that instruction, the text-space origin of the first glyph and the full text matrix.
The walk tracks Tf through q/Q save and restore and replays BT, Td, TD, Tm and T* to place each origin. Coordinates stay in text space, so a consumer that needs device space applies the page CTM itself.
Syntax
Delphi
TPDFTextRunArray = Array Of TPDFTextRun;Remarks
Text holds the font's own encoding bytes, so it is ASCII only for the standard simple fonts.
A TJ array contributes one run whose Text is the concatenation of its string elements; the kerning numbers in that array move the text matrix but are not part of Text.
InstructionIndex is the program position of the showing instruction, and FontResource names the resource without the leading slash, as set by the innermost Tf.
Runs appear in instruction order, and the array is Nil when the layer shows no text.
See also
GetTextRuns, TPDFTextRun, TPDFContentProgram, ReplaceTextRun, FindInstructionsInRect