THPDFContentToken Record
Repræsenterer ét indholdsstrøm-token, operator eller operand, med dets kildebyte-spænd og inline-billed-payload
Deklaration
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;
Enhed
HPDFContentStream
Felter
| Felt | Formål |
|---|---|
Kind | Tokentype: ctOperator, ctOperandString, ctOperandHex, ctOperandName, ctOperandNumber eller ctOperandArray |
Op | Operatortekst for ctOperator-tokens eller navneliteralen for navneoperander |
StrBytes | Rå bytes af en streng- eller hex-operand, inklusive afgrænsninger i kildespændet |
IsHex | True, når strengoperanden blev skrevet som en hex-streng |
NumValue | Numerisk operandværdi, inklusive TJ-kerningjusteringer |
Items | Array-payload for ctOperandArray-tokens |
StartOfs | Byteforskydning for tokenet, som det er skrevet i kildeindholdsstrømmen |
EndOfs | Byteforskydning lige efter tokenet |
InlineBytes | Rå billeddata mellem ID og EI; kun BI-operatortokenet bærer dem |
InlineKeys | Normaliseret BI-nøgle/værdi-sæt; tomt for alle tokens undtagen BI |
Brugsnoter
- Tokens er arbejdsenheden i
THPDFPageDisplayList, i fortolkerenhederne og hos operator-besøgende StartOfsogEndOfsknytter et matchet glyph tilbage til de præcise operand-bytes til søgning og erstatning- Kun
BI-operatortokenet bærer inline-billeddata; alle andre tokens laderInlineBytesogInlineKeysvære tomme