HPDFInterpretContentTokensDevice 过程

把已有的 token 数组分派给语义设备或完整 operator 设备,不再对内容流重新分词

声明

procedure HPDFInterpretContentTokensDevice(
  const Tokens: THPDFContentTokenArray;
  const Device: IHPDFContentDevice); overload;

procedure HPDFInterpretContentTokensDevice(
  const Tokens: THPDFContentTokenArray;
  const OperatorIndexes: array of Integer;
  const Device: IHPDFContentDevice); overload;

第二个重载使用已校验的缓存 operator 索引,重放时无需再扫描操作数 token

实现 IHPDFContentOperatorDevice 的设备会收到完整 operator 和取消检查点,其他设备则走经过能力过滤的语义分派器

HPDFInterpretContentStreamDevice 是字节级入口,把原始内容流字节分词后经同一套设备分派解释;HPDFExtractGlyphsViaDevice 则让字形提取走设备接口,字体解析器由调用方提供 IHPDFFontResolver

IHPDFContentOperatorDevice Interface