THPDFContentToken Kaydı
Kaynak bayt aralığı ve inline image yüküyle bir content-stream token'ını — operatör ya da operandı — temsil eder
Bildirim
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;
Birim
HPDFContentStream
Alanlar
| Alan | Amaç |
|---|---|
Kind | Token sınıfı: ctOperator, ctOperandString, ctOperandHex, ctOperandName, ctOperandNumber veya ctOperandArray |
Op | ctOperator token'ları için operatör metni; name operandları için ad literal'i |
StrBytes | String veya hex operandının ham baytları; kaynak aralıkta sınırlayıcılar dahildir |
IsHex | String operandı hex string olarak yazıldığında True olur |
NumValue | TJ kerning ayarlamaları dahil sayısal operand değeri |
Items | ctOperandArray token'ları için dizi yükü |
StartOfs | Token'ın kaynak content stream'de yazıldığı bayt ofseti |
EndOfs | Token'ın hemen sonrasındaki bayt ofseti |
InlineBytes | ID ile EI arasındaki ham görüntü verisi; yalnızca BI operatör token'ı taşır |
InlineKeys | Normalize edilmiş BI key/value kümesi; BI dışındaki her token için boştur |
Kullanım notları
- Token'lar;
THPDFPageDisplayList'in, interpreter device'ların ve operatör visitor'ların çalışma birimidir StartOfsveEndOfs, eşleşen bir glifi arama ve değiştirme için tam operand baytlarına geri eşler- Yalnızca
BIoperatör token'ı inline image verisi taşır; diğer tüm token'larInlineBytesveInlineKeysalanlarını boş bırakır