IBaseTextExtractor InterfaceByteScout PDF Extractor SDK
Defines a base interface for PDF text extractors.

Namespace:  Bytescout.PDFExtractor
Assembly:  Bytescout.PDFExtractor (in Bytescout.PDFExtractor.dll) Version: 12.0.0.4062-master
Syntax

public interface IBaseTextExtractor : IBaseOCRExtractor

The IBaseTextExtractor type exposes the following members.

Properties

  NameDescription
Public propertyAutoAlignColumnsToHeader
Gets or sets a value indicating whether to auto align text in columns while extracting text (with formatting preserved), csv, xml or not. True by default (i.e. align text in columns and header). False means to not auto align text and try to reproduce the original table.
Public propertyColumnDetectionByTextAlignment
Gets or set the visual text alignment in table cells. It helps to detect columns when tables don't have vertical separating lines between columns and the columns are formed by text alignment.
Public propertyColumnDetectionMode
Sets how columns are detected. Default: ContentGroupsAndBorders (columns are detected based on content groups and borders (vertical lines)).
Public propertyConsiderFontColors
Consider font colors in document text when detecting table structure. False by default.
Public propertyConsiderFontNames
Consider font names in document text when detecting table structure. False by default.
Public propertyConsiderFontSizes
Consider font sizes in document text when detecting table structure. False by default.
Public propertyConsiderVerticalBorders
Consider vertical borders colors in document text when detecting table structure and merging text objects. True by default.
Public propertyCustomExtractionColumns
Allows to override the automatic columns detection with custom columns.
Public propertyDetectLinesInsteadOfParagraphs
Lines detection option. Obsolete: Use LineGroupingMode instead.
Public propertyDetectNewColumnBySpacesRatio
Space ratio between words.
Public propertyEnableTextAnalysis
Enables or disables extracted text analysis. Check TextAnalysisResults after the extraction for analysis results.
Public propertyExtractAnnotations
Gets or sets a value indicating whether to extract text from annotation objects. Default is true.
Public propertyExtractColumnByColumn
Indicates if we should extract text column by column or should we use the original layout.
Public propertyExtractInvisibleText
Gets or sets a value indicating whether to extract invisible text from PDF document.
Public propertyExtractionColumns
Contains columns detected from last processed document page.
Public propertyExtractShadowLikeText
Gets or sets a value indicating whether to include characters used to create "shadow" effect (when the same character appears with some offset) from PDF document. True by default (includes all encoded characters disregarding their real appearance).
Public propertyLineGroupingMode
When grouping text, each new line of text will start a new group (rather than paragraph grouping) Default: None. (no merging is done. Just processing line by line).
Public propertyOCRAutoModeMinExistingTextLength
Applies to OCRMode.Auto only: Min total length of existing text on current page to decide if OCR should be run or not. If the length of text is lesser than this property then library runs OCR for this page. Otherwise it extracts the existing text only.
(Inherited from IBaseOCRExtractor.)
Public propertyOCRBlackList
OCRBlackList property allows to define a list of characters not allowed to be recognized from scanned document. The resulting text will only contain characters that are not in this list.
(Inherited from IBaseOCRExtractor.)
Public propertyOCRCacheMode
OCR results caching behaviour. Turned off by default (no cache is used). In "WholePage" caching mode you may save processing time as the SDK will check if need to re-run OCR on the page or can just pull results from previously cached OCR results.
(Inherited from IBaseOCRExtractor.)
Public propertyOCRCorrections
Collection of corrections automatically applied to recognized text to fix repeating recognition errors.
(Inherited from IBaseOCRExtractor.)
Public propertyOCRDetectPageRotation
Gets or sets whether to detect scanned page rotation. Slightly slows down the processing time.
(Inherited from IBaseOCRExtractor.)
Public propertyOCRImagePreprocessingFilters
Collection of image processing filters applied to the document page before Optical Character Recognition (OCR). May improve the recognition quality.
(Inherited from IBaseOCRExtractor.)
Public propertyOCRLanguage
Language for Optical Character Recognition (OCR). The valid values are:
  • "eng" - English (default)
  • "deu" - German
  • "fra" - French
  • "spa" - Spanish

Download more languages at https://github.com/bytescout/ocrdata.

(Inherited from IBaseOCRExtractor.)
Public propertyOCRLanguageDataFolder
Folder containing OCR language data files.
(Inherited from IBaseOCRExtractor.)
Public propertyOCRMaximizeCPUUtilization
Gets or sets maximum OCR performance using Intel OpenMP (if available) to accelerate to approximately 30%. Default is false.
(Inherited from IBaseOCRExtractor.)
Public propertyOCRMode
Enables Optical Character Recognition (OCR) to recognize text from embedded images. Set the language using OCRLanguage property.

This option requires Bytescout.PDFExtractor.OCRExtension.dll assembly and appropriate language files in OCRLanguageDataFolder folder. The SDK is shipped with language files for English, French, German and Spanish. You can download more languages at https://github.com/bytescout/ocrdata.

(Inherited from IBaseOCRExtractor.)
Public propertyOCROverallConfidence
Gets overall OCR confidence. This value is calculated after the extraction is performed.
(Inherited from IBaseOCRExtractor.)
Public propertyOCRResolution
Resolution of Optical Character Recognition (OCR). Default is 300 DPI.
(Inherited from IBaseOCRExtractor.)
Public propertyOCRWhiteList
OCRWhiteList property allows to define a list of characters allowed to be recognized from scanned document. Only characters from this list will appear in the result text.
(Inherited from IBaseOCRExtractor.)
Public propertyPreserveFormattingOnTextExtraction
Gets or sets a value indicating whether to preserve the text formatting on the extraction.
Public propertyRemoveHyphenation
Gets or sets a value indicating whether to automatically remove hyphenations in end of lines (works when Unwrap is True).
Public propertyRotationAngle
Gets or sets whether to rotate document pages to specified angle before the extraction.
Public propertyRTLTextAutoDetectionEnabled
Enables RTL (Right-To-Left) text auto detection. Default is true.
Public propertyShrinkMultipleSpaces
Replaces multiple spaces in text objects with a single space. Multiple spaces affect the detection of columns, so removing them can improve the result. Default is false.
Public propertyTableXMinIntersectionRequiredInPercents
Structured extraction (CSV, XML, XLS, StructuredExtractor, TextExtractor with PreserveFormatting = true) This option controls how much % of the cell's rectangle should intersect (by X coordinate axis) with previous cell to treat both cells belonging to the same column.
Public propertyTableYMinIntersectionRequiredInPercents
Structured extraction (CSV, XML, XLS, StructuredExtractor, TextExtractor with PreserveFormatting = true) This option controls how much % of the cell's rectangle should intersect (by Y coordinate axis) with previous cell to treat both cells belonging to the same row.
Public propertyTextAnalysisCorruptedTextThreshold
The criterion of detection of the corrupted text used in text analysis. Default is 0.5.
Public propertyTextAnalysisResults
Results of the text analysis. Enable the analysis using EnableTextAnalysis property.
Public propertyTextEncodingCodePage
Gets or sets the text encoding. Default code page is 28591 ("iso-8859-1").
Public propertyTrimSpaces
Trim spaces from text lines (FALSE by default to preserve original formatting if any).
Public propertyUnwrap
Unwraps lines in columns into one single. True by default
Public propertyXCoordinateToleranceFactor
Sets X coordinate tolerance to use when reproducing the structure of PDF page content.
Public propertyYCoordinateToleranceFactor
Sets Y coordinate tolerance to use when reproducing the structure of PDF page content.
Top
Methods

  NameDescription
Public methodAddFilter(String, Boolean, Boolean)
Adds a filter to remove a text from extracted data.
Public methodAddFilter(String, Int32, Boolean)
Adds filter to exclude text objects with specified attributes.
Public methodAddFilter(String, Int32, Color, Boolean)
Adds filter to exclude text objects with specified attributes.
Public methodAddFilter(String, String, Boolean, Boolean)
Adds a filter to replace a text in extracted data.
Public methodAddFilter(String, Int32, Int32, Int32, Int32, Boolean)
Adds filter to exclude text objects with specified attributes.
Public methodDisposePage
Disposes the page object. Uses this method carefully to destroy the page object that should not be used further. Useful to free allocated memory when processing huge PDF documents.
Public methodGetPreprocessedPagePreview
Returns preview image of document page with preprocessing filters applied.
Public methodIsOCRRecommendedForPage
Detects whether OCR is recommended for specified page. OCR (Optical Character Recognition) is recommended when pages has no text objects bat has an image that might contain text.
(Inherited from IBaseOCRExtractor.)
Public methodResetFilters
Reset text filters.
Public methodSavePreprocessedPagePreview
Saves preview image of document page with preprocessing filters applied. Image is saved in PNG format.
Public methodSetCustomExtractionColumns
Helper method to set CustomExtractionColumns property when using the extractor though COM from VC++ VB, VBA, VBScript, or Delphi.
Top
See Also

Reference