PreprocessScannedPageRange

Rendering and image preprocessing

Description

Applies the scanned-page cleanup pipeline of PreprocessScannedPage across a 1-based page range list such as "1-3,5"

Syntax

Delphi

Function TPDFlib.PreprocessScannedPageRange(Const PageRange: WideString; DPI: Double= 150; Options: Integer= 15; SauvolaWindow: Integer= 15; SauvolaK: Double= 0.2): Integer;

Parameters

PageRangePage range specification (for example "1-5,8") or empty string for all pages
DPITarget rasterization resolution in dots per inch (clamped to 72..600)
OptionsBitmask of preprocessing stages matching PreprocessScannedPage
SauvolaWindowLocal window radius in pixels for Sauvola thresholding (default 15)
SauvolaKSauvola sensitivity factor (default 0.2)

Return values

>= 1The number of pages successfully preprocessed
0No pages matched the range or preprocessing failed

Remarks

Preserves the original page selection after processing all pages in the range

See also

PreprocessScannedPage, DeskewPageRange, ApplyOCRTextLayer