THPDFContentToken Record
소스 바이트 스팬과 인라인 이미지 페이로드를 갖춘 콘텐츠 스트림 토큰 하나(연산자 또는 피연산자)를 표현합니다
선언
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 | 문자열 또는 hex 피연산자의 원본 바이트. 소스 스팬 안의 구분자를 포함합니다 |
IsHex | 문자열 피연산자가 hex 문자열로 쓰였을 때 True |
NumValue | 숫자 피연산자 값. TJ 커닝 조정 값을 포함합니다 |
Items | ctOperandArray 토큰의 배열 페이로드 |
StartOfs | 소스 콘텐츠 스트림에 쓰인 그대로의 토큰 바이트 오프셋 |
EndOfs | 토큰 바로 다음의 바이트 오프셋 |
InlineBytes | ID와 EI 사이의 원본 이미지 데이터. BI 연산자 토큰만 실어 줍니다 |
InlineKeys | 정규화된 BI 키/값 집합. BI가 아닌 토큰에서는 비어 있습니다 |
사용 참고 사항
- 토큰은
THPDFPageDisplayList, 인터프리터 디바이스, 연산자 방문자의 작업 단위입니다 StartOfs와EndOfs는 검색·치환을 위해 매칭된 glyph를 정확한 피연산자 바이트로 대응시킵니다- 인라인 이미지 데이터를 실는 것은
BI연산자 토큰뿐이고, 나머지 토큰은InlineBytes와InlineKeys를 비워 둡니다