Skip to main content

PdfOcrExtractionNodeConfiguration

Namespace: Meshmakers.Octo.MeshAdapter.Nodes.Transform

Configuration for PDF OCR extraction node that uses IronOCR to extract text and data from PDF files

public record PdfOcrExtractionNodeConfiguration : SourceTargetPathNodeConfiguration, INodeConfiguration, IEquatable<NodeConfiguration>, ITargetPathNodeConfiguration, IEquatable<TargetPathNodeConfiguration>, IPathNodeConfiguration, IEquatable<SourceTargetPathNodeConfiguration>, IEquatable<PdfOcrExtractionNodeConfiguration>

Inheritance Object → NodeConfiguration → TargetPathNodeConfiguration → SourceTargetPathNodeConfiguration → PdfOcrExtractionNodeConfiguration
Implements INodeConfiguration, IEquatable<NodeConfiguration>, ITargetPathNodeConfiguration, IEquatable<TargetPathNodeConfiguration>, IPathNodeConfiguration, IEquatable<SourceTargetPathNodeConfiguration>, IEquatable<PdfOcrExtractionNodeConfiguration>

Properties

PageNumbers

Specific page numbers to process (if not set, all pages will be processed)

public Int32[] PageNumbers { get; set; }

Property Value

Int32[]

Language

OCR language code (e.g., 'en', 'de', 'fr')

public string Language { get; set; }

Property Value

String

ExtractTables

Whether to extract tables from the PDF

public bool ExtractTables { get; set; }

Property Value

Boolean

TablesOutputPath

Output path for extracted tables

public string TablesOutputPath { get; set; }

Property Value

String

ExtractBarcodes

Whether to extract barcodes from the PDF

public bool ExtractBarcodes { get; set; }

Property Value

Boolean

BarcodesOutputPath

Output path for extracted barcodes

public string BarcodesOutputPath { get; set; }

Property Value

String

IncludeConfidence

Whether to include OCR confidence score in output

public bool IncludeConfidence { get; set; }

Property Value

Boolean

ConfidenceOutputPath

Output path for OCR confidence score

public string ConfidenceOutputPath { get; set; }

Property Value

String

ContinueOnError

Whether to continue processing if OCR extraction fails

public bool ContinueOnError { get; set; }

Property Value

Boolean

MaxFileSizeBytes

Maximum accepted PDF size in bytes. Files larger than this abort the node with a FileTooLarge error. Defaults to 1 MB (the previously hard-coded limit); raise it for pipelines that process real-world scans.

public int MaxFileSizeBytes { get; set; }

Property Value

Int32

EnhanceImage

Input handling: the node auto-detects PDF vs. image (JPEG/PNG/TIFF/…) by magic bytes. When the input is an image and this is enabled (default), IronOCR pre-processing filters (deskew + denoise) are applied first so casual phone photos of documents OCR much better. Disable to feed the raw image unmodified.

public bool EnhanceImage { get; set; }

Property Value

Boolean

MaxDeskewAngle

Maximum in-plane skew angle (degrees) the deskew filter corrects on image input. Higher values catch more tilt but are slower and can misfire. Only used when PdfOcrExtractionNodeConfiguration.EnhanceImage is enabled. Note: this corrects rotation, not perspective distortion (angled shots) — that needs a separate document-detection step.

public int MaxDeskewAngle { get; set; }

Property Value

Int32

PreferTextLayer

For PDF input, extract the embedded text layer first (digital PDFs) and only fall back to raster+Tesseract OCR when the layer is missing or too sparse (scanned/image PDFs). The text layer is exact where OCR is lossy: Tesseract drops separator-less alphanumeric codes such as invoice numbers and mangles non-German diacritics. Enabled by default. Ignored for image input and when PdfOcrExtractionNodeConfiguration.ExtractTables or PdfOcrExtractionNodeConfiguration.ExtractBarcodes is requested (those only come from the OCR path). AB#4528.

public bool PreferTextLayer { get; set; }

Property Value

Boolean

MinTextLayerChars

Minimum number of characters the embedded PDF text layer must yield for it to be treated as a digital PDF and used in place of OCR. Below this threshold the PDF is assumed to be a scan (empty/near-empty text layer) and the node falls back to Tesseract OCR. Only used when PdfOcrExtractionNodeConfiguration.PreferTextLayer is enabled.

public int MinTextLayerChars { get; set; }

Property Value

Int32

Path

public string Path { get; set; }

Property Value

String

TargetPath

public string TargetPath { get; set; }

Property Value

String

TargetValueWriteMode

public TargetValueWriteModes TargetValueWriteMode { get; set; }

Property Value

TargetValueWriteModes

TargetValueKind

public ValueKinds TargetValueKind { get; set; }

Property Value

ValueKinds

DocumentMode

public DocumentModes DocumentMode { get; set; }

Property Value

DocumentModes

Description

public string Description { get; set; }

Property Value

String

Constructors

PdfOcrExtractionNodeConfiguration()

public PdfOcrExtractionNodeConfiguration()