OCRDocument
OCR, rendering, document editing
Description
Runs the OnOCRPage provider pipeline over a page range while retaining only one raster page at a time
Syntax
Delphi
Function TPDFlib.OCRDocument(Const PageRange: WideString; DPI: Double;
Const Language, FontName: WideString; MinConfidence: Double): Integer;Parameters
| PageRange | A page-range expression such as 1-3,7, or an empty string for every page |
|---|---|
| DPI | The positive raster resolution sent to the provider |
| Language | A provider-defined language hint |
| FontName | An embeddable TrueType font name or path, or an empty string for fallback selection |
| MinConfidence | The inclusive threshold from 0 through 1 |
Return values
The number of pages processed before completion, failure, or cancellation
A successful call returns the number of pages selected by PageRange
Remarks
Each PNG is released after its callback and before the next page is rendered, so peak raster memory follows the largest page rather than the page count
Operation progress and cooperative cancellation use the normal PDF Library for Delphi progress lifecycle