THPDFArrayItem 記錄

內容流 TJ [...] 陣列裡的一個運算元,字串與數字會在這裡交錯出現

THPDFArrayItem = record
  IsString: boolean;
  IsHex: boolean;
  StrBytes: AnsiString;   // raw bytes of a string/hex operand
  NumValue: Double;        // numeric operand (TJ kerning adjust)
  StartOfs: Integer;       // byte offset of the operand in the source stream
  EndOfs: Integer;         // byte offset just past the operand
end;

字串項照目前的文字位置繪製,負數則當作字距調整把位置往前推;IsString 用來分辨這兩種情況,IsHex 標記十六進位字面值,StrBytes 保存運算元的原始位元組,NumValue 放的則是調整量

StartOfs 與 EndOfs 是相對來源內容流的位元組偏移,範圍涵蓋完整字面值連同它的 '(' ')' 或 '<' '>' 界符,所以比對到的 glyph 能夠回溯到產生它的那些位元組

THPDFContentToken.Items 攜帶 ctOperandArray token 的陣列承載內容

THPDFContentToken · 內容串流語意比較