THPDFContentToken 记录

表示一个内容流令牌(操作符或操作数),带有其源字节区段和内联图像负载

声明

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

字段

字段用途
Kind令牌类别:ctOperator、ctOperandString、ctOperandHex、ctOperandName、ctOperandNumber 或 ctOperandArray
OpctOperator 令牌的操作符文本,或名称操作数的名称字面量
StrBytes字符串或十六进制操作数的原始字节,源区段中包含定界符
IsHex字符串操作数以十六进制字符串形式书写时为 True
NumValue数值操作数的值,包括 TJ 字距调整
ItemsctOperandArray 令牌的数组负载
StartOfs令牌在源内容流中书写位置的字节偏移
EndOfs刚好越过令牌之后的字节偏移
InlineBytesID 与 EI 之间的原始图像数据;只有 BI 操作符令牌携带它
InlineKeys规范化的 BI 键/值集合;BI 以外的所有令牌都为空

使用说明

相关 API