THPDFContentToken レコード
ソースバイトスパンとインライン画像ペイロードを伴う、コンテンツストリームの 1 つのトークン(オペレータまたはオペランド)を表します
宣言
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;
ユニット
HPDFContentStream
フィールド
| フィールド | 目的 |
|---|---|
Kind | トークン種別。ctOperator、ctOperandString、ctOperandHex、ctOperandName、ctOperandNumber、ctOperandArray のいずれか |
Op | ctOperator トークンのオペレータテキスト。名前オペランドでは名前リテラル |
StrBytes | 文字列または 16 進オペランドの生バイト。ソーススパンには区切り文字を含みます |
IsHex | 文字列オペランドが 16 進文字列として書かれていた場合に True |
NumValue | 数値オペランドの値。TJ のカーニング調整分を含みます |
Items | ctOperandArray トークンの配列ペイロード |
StartOfs | ソースコンテンツストリームでトークンが書かれていた位置のバイトオフセット |
EndOfs | トークンの直後のバイトオフセット |
InlineBytes | ID と EI の間にある生画像データ。BI オペレータトークンだけが保持します |
InlineKeys | 正規化済みの BI キー/値セット。BI 以外のトークンでは空 |
使用上の注意
- トークンは
THPDFPageDisplayList、インタプリタデバイス、オペレータビジターに共通する処理単位です StartOfsとEndOfsは、検索と置換のために、マッチしたグリフを正確なオペランドバイトへ対応付けます- インライン画像データを運ぶのは
BIオペレータトークンだけです。他のトークンはInlineBytesとInlineKeysを空のままにします