Built-in OCR and Barcode Recognition
Engine-free overloads of ApplyLoadedOCRTextLayer and DecodeLoadedPageBarcodes use HotPDF's bounded built-in recognizers
OCR scope
The built-in OCR backend recognizes machine-printed ASCII letters and digits, including mixed-case text, through Otsu binarization with a local-window fallback, connected-component glyph extraction, and bounded grayscale template matching against cached multi-font glyph templates
Regular, bold, italic, and bold italic templates cover Arial, Times New Roman, Courier New, Tahoma, and Segoe UI without an external OCR installation
The recognizer normalizes light text on a predominantly dark background and accepts faded text when the grayscale range is at least 16 levels out of 255, while preserving the caller's bitmap and its word coordinates
Line-level height clustering and case-context preference separate upper- and lowercase shapes, i and j dots are merged with their stems, speckle noise below a minimum component area is ignored, and word gaps are detected by bimodal gap clustering
Recognized words report per-line baselines and cap heights so ApplyLoadedOCRTextLayer can place searchable text precisely
Natural scenes, unsupported fonts, very small text, and ambiguous shapes still return no guessed word, and any word containing an unrecognized retained glyph is omitted as a whole instead of silently losing characters
Uniform backgrounds and images with a grayscale range below 16 levels return no result; automatic polarity selection assumes the background occupies most of the page
A valid image with no recognized words completes successfully with an empty result array, including blank, low-contrast, and unsupported-text pages; scanned-document batches continue to later pages, while invalid requests, cancellation, and exhausted limits still fail
Windows FPC reads both 24-bit and 32-bit input bitmaps without changing their pixel format or discarding the original pixels
Barcode scope
The built-in linear backend decodes Code 39, Code 128 sets A/B/C with SHIFT and FNC controls, EAN-8, EAN-13, UPC-A, and UPC-E with their required checksums
QR Code versions 1 to 40 support quarter-turn and mirror orientations, finder-based perspective sampling, BCH format recovery, and Reed-Solomon correction of damaged codewords within each block's capacity
Data Matrix ECC 200 supports square sizes from 10 to 144 modules, the six standard rectangular sizes, multiple regions and blocks, and ASCII, C40, Text, X12, EDIFACT, and Base256 payloads
PDF417 supports text, numeric, and byte compaction with GF(929) Reed-Solomon correction at error correction levels 0 through 8
Byte payloads preserve their raw bytes and honor supported ECI character sets, including UTF-8; unsupported ECI values fail explicitly
Each built-in image scan locates multiple separated supported symbols, keeps repeated payloads at different positions, and reports per-symbol bounds and confidence; Multi-symbol Raster Barcode Scanning provides the native helper, projected Data Matrix corners, and scanning budgets
Data Matrix supports rotated and trapezoidal projective sampling, including correctable data-module damage; DMRE remains outside the decoder, and PDF417 recovery requires every row's locator patterns to remain recognizable
Damage that destroys locator geometry or exceeds correction capacity returns no result, and touching or overlapping symbols can prevent independent localization
Budgets and atomicity
Recognition is limited to 4096 by 4096 images and 4,194,304 pixels with fixed time, result, text, and raw-byte limits
Built-in OCR checks its two-second deadline and cancellation token during pixel conversion, thresholding, component extraction, glyph normalization, and line analysis; an 8,192-component ceiling bounds dense-noise analysis
Cancellation propagates through the existing OCR and barcode pipelines, which publish results only after the complete request succeeds