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
| Campo | Propósito |
|---|---|
Kind | Clase de token: ctOperator, ctOperandString, ctOperandHex, ctOperandName, ctOperandNumber o ctOperandArray |
Op | Texto del operador para tokens ctOperator, o el literal del name para operandos name |
StrBytes | Bytes crudos de un operando de cadena o hex, incluidos los delimitadores dentro del span de la fuente |
IsHex | True cuando el operando de cadena se escribió como cadena hex |
NumValue | Valor del operando numérico, incluidos los ajustes de kerning TJ |
Items | Payload de array para tokens ctOperandArray |
StartOfs | Offset en bytes del token tal como está escrito en el content stream de la fuente |
EndOfs | Offset en bytes justo después del token |
InlineBytes | Datos de imagen crudos entre ID y EI; solo lo lleva el token del operador BI |
InlineKeys | Conjunto de claves/valores BI normalizado; vacío en todos los tokens distintos de BI |
Notas de uso
- Los tokens son la unidad de trabajo de
THPDFPageDisplayList, de los devices intérpretes y de los visitors de operadores StartOfsyEndOfsmapean un glyph encontrado de vuelta a los bytes exactos del operando, para buscar y reemplazar- Solo el token del operador
BIlleva datos de imagen inline; todos los demás tokens dejanInlineBytesyInlineKeysvacíos