IHPDFContentOperatorDevice Interface

面向生产级消费方的可选扩展:这些消费方已经拥有完整的 PDF 图形与资源状态机

声明

IHPDFContentOperatorDevice = interface
  procedure CheckContentCancellation;
  procedure ProcessContentOperator(
    const Tokens: THPDFContentTokenArray;
    OperatorIndex: Integer;
    out ConsumedTokenCount: Integer);
end;

共享解释器会校验 operator 索引,每分派一个 operator 调用一次 CheckContentCancellation,并在 operator 消耗后续 token 时采纳正数 ConsumedTokenCount

先实现 IHPDFContentDevice 作为基础接口,只有当语义 callback 无法表达消费方的完整状态机时,才加上这个扩展

Display Lists and Print Production