THPDFContentToken Record
Reprezentuje jeden token strumienia treści, operator albo operand, z jego źródłowym zakresem bajtów i ładunkiem obrazu inline
Deklaracja
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;
Jednostka
HPDFContentStream
Pola
| Pole | Przeznaczenie |
|---|---|
Kind | Klasa tokenu: ctOperator, ctOperandString, ctOperandHex, ctOperandName, ctOperandNumber albo ctOperandArray |
Op | Tekst operatora dla tokenów ctOperator albo literał nazwy dla operandów nazw |
StrBytes | Surowe bajty operandu ciągowego albo szesnastkowego, łącznie z delimiterami w zakresie źródłowym |
IsHex | True, gdy operand ciągowy został zapisany jako ciąg szesnastkowy |
NumValue | Wartość operandu liczbowego, łącznie z korektami kerningu TJ |
Items | Ładunek tablicowy tokenów ctOperandArray |
StartOfs | Offset bajtowy tokenu zapisanego w źródłowym strumieniu treści |
EndOfs | Offset bajtowy tuż za tokenem |
InlineBytes | Surowe dane obrazu między ID a EI; niesie je wyłącznie token operatora BI |
InlineKeys | Znormalizowany zbiór klucz/wartość BI; pusty dla każdego tokenu innego niż BI |
Uwagi dotyczące użycia
- Tokeny są jednostką pracy
THPDFPageDisplayList, urządzeń interpretujących i odwiedzających operatorów StartOfsiEndOfsmapują dopasowany glif z powrotem na dokładne bajty operandu dla wyszukiwania i zamiany- Tylko token operatora
BIniesie dane obrazu inline; wszystkie pozostałe tokeny zostawiająInlineBytesiInlineKeyspuste