THotPDF.ApplyLoadedOCRTextLayer Method
Renders selected pages, invokes a caller-supplied OCR engine, validates the recognised words, and atomically commits an invisible searchable text layer
声明
function ApplyLoadedOCRTextLayer(
const PageIndices: array of Integer;
const Engine: IHPDFOCREngine;
const Options: THPDFOCRTextLayerOptions;
out Info: THPDFOCRTextLayerInfo): boolean;
参数
PageIndicessupplies zero-based page indices, with an empty array selecting all loaded pages and duplicates removedEngineis the synchronous recogniser and must not benilOptionscontrols rendering, confidence, existing-text handling, optional-content grouping, budgets, and cancellationInforeceives status, diagnostics, counters, and resource totals for every outcome
结果
返回 True for a committed layer or a successful run with no accepted words
返回 False for invalid options, engine failure, exhausted budgets, cancellation, or commit failure without publishing a partial object graph
The engine runs on the calling thread and receives each page bitmap only for the duration of its Recognize call