THPDFContentToken Record
Rappresenta un token del content stream, operatore o operando, con il suo span di byte nella sorgente e il payload dell'immagine inline
Dichiarazione
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;
Unità
HPDFContentStream
Campi
| Campo | Scopo |
|---|---|
Kind | Classe del token: ctOperator, ctOperandString, ctOperandHex, ctOperandName, ctOperandNumber o ctOperandArray |
Op | Testo dell'operatore per i token ctOperator, o il letterale del name per gli operandi name |
StrBytes | Byte grezzi di un operando stringa o hex, inclusi i delimitatori nello span di sorgente |
IsHex | True quando l'operando stringa è stato scritto come stringa hex |
NumValue | Valore dell'operando numerico, inclusi gli aggiustamenti di crenatura TJ |
Items | Payload array per i token ctOperandArray |
StartOfs | Offset di byte del token come scritto nel content stream sorgente |
EndOfs | Offset di byte subito dopo il token |
InlineBytes | Dati immagine grezzi tra ID e EI; lo porta solo il token operatore BI |
InlineKeys | Insieme chiave/valore BI normalizzato; vuoto per ogni token diverso da BI |
Note sull'utilizzo
- I token sono l'unità di lavoro di
THPDFPageDisplayList, dei dispositivi interpreti e dei visitor degli operatori StartOfseEndOfsriportano un glifo trovato ai byte esatti dell'operando per la ricerca e sostituzione- Solo il token operatore
BIporta i dati dell'immagine inline; tutti gli altri token lascianoInlineByteseInlineKeysvuoti