THPDFContentToken Record

表示單一內容串流 token(運算子或運算元),帶有來源位元組區間與內嵌影像承載

宣告

THPDFContentToken= record
  Kind: THPDFContentTokenKind;
  Op: AnsiString;           // operator text (ctOperator) or name literal
  StrBytes: AnsiString;     // raw bytes of string/hex operand
  IsHex: boolean;
  NumValue: Double;         // numeric operand
  Items: THPDFArrayItems;   // ctOperandArray payload
  // StartOfs/EndOfs are byte offsets into the source content stream spanning
  // the operand as written. For a string/hex operand this covers the full
  // literal including its '(' ')' or '<' '>' delimiters; operators and
  // other operands record their span too. Search/replace uses these to map
  // a matched glyph back to the bytes that produced it
  StartOfs: Integer;
  EndOfs: Integer;
  // Inline image payload (only the 'BI' operator token carries these;
  // every other token leaves them at their default zeros). InlineBytes is
  // the raw image data between ID and EI; InlineKeys is the normalised
  // BI key/value set. Both default to empty when not an inline image
  InlineBytes: SysUtils.TBytes;
  InlineKeys: THPDFInlineImgKeys;
end;

單元

HPDFContentStream

欄位

欄位用途
KindToken 類別:ctOperator、ctOperandString、ctOperandHex、ctOperandName、ctOperandNumber 或 ctOperandArray
OpctOperator token 的運算子文字,或名稱運算元的名稱字面值
StrBytes字串或十六進位運算元的原始位元組,含來源區間中的分隔符號
IsHex字串運算元以十六進位字串書寫時為 True
NumValue數值運算元的值,含 TJ 調整字距的數值
ItemsctOperandArray token 的陣列承載
StartOfstoken 在來源內容串流中書寫位置的位元組偏移
EndOfstoken 結束後緊鄰的位元組偏移
InlineBytesID 與 EI 之間的原始影像資料;只有 BI 運算子 token 會承載它
InlineKeys正規化的 BI 鍵/值集合;BI 以外的 token 皆為空

使用說明

相關 API