Record THPDFContentToken

Representa un token de content stream, operador u operando, con su span de bytes en la fuente y el payload de imagen inline

Declaración

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;

Unidad

HPDFContentStream

Campos

CampoPropósito
KindClase de token: ctOperator, ctOperandString, ctOperandHex, ctOperandName, ctOperandNumber o ctOperandArray
OpTexto del operador para tokens ctOperator, o el literal del name para operandos name
StrBytesBytes crudos de un operando de cadena o hex, incluidos los delimitadores dentro del span de la fuente
IsHexTrue cuando el operando de cadena se escribió como cadena hex
NumValueValor del operando numérico, incluidos los ajustes de kerning TJ
ItemsPayload de array para tokens ctOperandArray
StartOfsOffset en bytes del token tal como está escrito en el content stream de la fuente
EndOfsOffset en bytes justo después del token
InlineBytesDatos de imagen crudos entre ID y EI; solo lo lleva el token del operador BI
InlineKeysConjunto de claves/valores BI normalizado; vacío en todos los tokens distintos de BI

Notas de uso

APIs relacionadas