THPDFOCRTextLayerOptions Record
Controls recognition quality, page selection behaviour, layer grouping, cancellation and hard resource limits
Default values
DPIis 300 andMinimumConfidenceis 0.5SkipPagesWithTextisTrueReplaceExistingOCRTextLayerisFalse; set it toTrueto recognise pages with a marked HotPDF OCR layer again and replace that layer atomicallyUseOptionalContentGroupisFalse, the name isOCR Text Layer, and default visibility isTrueMaxPageCountis 10000 andMaxPixelsPerPageis 100000000MaxTotalPixelsis 1000000000,MaxWordsPerPageis 100000, andMaxTotalWordsis 1000000MaxTextCodeUnitsis 16777216 andMaxContentBytesis 1073741824CancellationTokenisniland falls back to the document operation token
Call THPDFOCRTextLayerOptions.Default before overriding individual fields
MaxTotalWords limits received results, including words later dropped for low confidence or invalid geometry; each subsequent engine request receives the remaining word allowance
When a word or UTF-16 budget is exhausted before another eligible page, the operation reports otlsBudgetExceeded without rendering that page or publishing partial text; a final page may consume the exact remaining budget
Replacement bypasses SkipPagesWithText only on pages containing a marked HotPDF OCR stream; other pages still follow the skip option
Layers created before the stream marker was introduced, and layers created by other tools, are preserved; an empty recognition result also preserves the existing layer