IHPDFOCREngine Interface
Abstracts the OCR provider while HotPDF owns page rendering, validation, PDF geometry, Unicode mapping, resource limits, and transactional publication
声明
IHPDFOCREngine = interface(IInterface)
function GetName: AnsiString;
function Recognize(const Request: THPDFOCRRequest;
out Words: THPDFOCRWords;
out Diagnostic: AnsiString): boolean;
property Name: AnsiString read GetName;
end;
Contract
Recognize returns True after producing zero or more words and returns False with a diagnostic when recognition cannot complete
The bitmap and cancellation token are borrowed for the call, and implementations must obey MaxWords 和 MaxTextCodeUnits
Implementations may report word boxes without baselines, in which case HotPDF infers a horizontal baseline near the bottom of the box