THotPDF.ApplyLoadedOCRTextLayer Method

Renders selected pages, invokes a caller-supplied OCR engine, validates the recognised words, and atomically commits an invisible searchable text layer

Declaration

function ApplyLoadedOCRTextLayer(
    const PageIndices: array of Integer;
    const Engine: IHPDFOCREngine;
    const Options: THPDFOCRTextLayerOptions;
    out Info: THPDFOCRTextLayerInfo): boolean;

Parameters

Result

Returns True for a committed layer or a successful run with no accepted words

Returns 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

Searchable OCR Text Layers