PdfOcrOptions class
Namespace: PdfNetStack.Ocr
Assembly: PdfNetStack.Ocr.dll
Package: PdfNetStack.Ocr
Settings for PdfOcr.
public sealed class PdfOcrOptionsInheritance
Properties
Section titled “Properties”DetectOrientation
Section titled “ DetectOrientation”Find scans whose text is turned a quarter or half turn with nothing in the PDF saying so, as when a page is fed into a scanner sideways, and read them turned back. Only pages where most of the text read does not run left to right cost more: a reduced copy is read in each of the four orientations, then the page once more in the best one.
public bool DetectOrientation { get; init; }Property Value
Section titled “Property Value”Languages
Section titled “ Languages”Scripts to read: latin, arabic. With several, each line keeps the reading
its recognizer is most confident in. The engine must have each one loaded.
public IReadOnlyList<string> Languages { get; init; }Property Value
Section titled “Property Value”MaxDegreeOfParallelism
Section titled “ MaxDegreeOfParallelism”Pages recognized at once. Each holds its decoded scan in memory.
public int MaxDegreeOfParallelism { get; init; }Property Value
Section titled “Property Value”MaxImagePixels
Section titled “ MaxImagePixels”Scans with more pixels are skipped rather than decoded: about 11,500 by 11,500.
public long MaxImagePixels { get; init; }Property Value
Section titled “Property Value”MaxOcrDpi
Section titled “ MaxOcrDpi”Scans finer than this are averaged down to it before recognition.
public double MaxOcrDpi { get; init; }Property Value
Section titled “Property Value”MinimumConfidence
Section titled “ MinimumConfidence”Lines read with less confidence than this are left out.
public double MinimumConfidence { get; init; }Property Value
Section titled “Property Value”MinimumCoverage
Section titled “ MinimumCoverage”Share of the crop box an image must cover to be read as the page’s scan.
public double MinimumCoverage { get; init; }Property Value
Section titled “Property Value”Rasterizer
Section titled “ Rasterizer”Renders pages that have no scan to read: text drawn as vector outlines, vector art with images too small to be a scan, or scans in encodings or placements that are not decoded. Null (the default) leaves such pages unread. PdfNetStack has no renderer; see IPdfPageRasterizer.
public IPdfPageRasterizer? Rasterizer { get; init; }Property Value
Section titled “Property Value”RasterizerDpi
Section titled “ RasterizerDpi”The resolution pages are rendered at by Rasterizer, at most MaxOcrDpi.
public double RasterizerDpi { get; init; }Property Value
Section titled “Property Value”SkipPagesWithText
Section titled “ SkipPagesWithText”Leave pages that already show text alone, so OCR never runs twice over a page.
public bool SkipPagesWithText { get; init; }