IBaseTextExtractor Interface
Free Trial Web API version Licensing Request A Quote
HAVE QUESTIONS OR NEED HELP?SUBMIT THE SUPPORT REQUEST FORM or write email toSUPPORT@BYTESCOUT.COM
Defines a base interface for PDF text extractors.
Namespace:Bytescout.PDFExtractorAssembly: Bytescout.PDFExtractor (in Bytescout.PDFExtractor.dll) Version: 13.4.0.4760-master
Syntax
The IBaseTextExtractor type exposes the following members.
Properties
Name | Description | |
---|---|---|
AutoAlignColumnsToHeader | Sets whether to align text in the columns to the header. | |
ColumnDetectionByTextAlignment | Suggests the extractor 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. | |
ColumnDetectionMode | Sets how columns are detected. Default is 'ContentGroupsAndBorders' - columns are detected by grouping of text objects and by vertical vector lines. | |
ConsiderBackgroundColors | Consider background colors under text objects when detecting table structure. It can be useful for striped tables, but may degrade extraction quality on scanned documents because of uneven image background. Default is false. | |
ConsiderFontColors | Consider font colors in document text when detecting table structure. Default is false. | |
ConsiderFontNames | Consider font names in document text when detecting table structure. Default is false. | |
ConsiderFontSizes | Consider font sizes in document text when detecting table structure. Default is false. | |
ConsiderHorizontalBorders | Consider horizontal borders between text objects when detecting table structure and merging objects. Default is true. | |
ConsiderVerticalBorders | Consider vertical borders between text objects when detecting table structure and merging objects. Default is true. | |
CustomExtractionColumns | Allows to override automatic columns detection with custom columns coordinates. | |
DetectLinesInsteadOfParagraphs | Lines detection option. Obsolete: Use LineGroupingMode instead. | |
DetectNewColumnBySpacesRatio | Space ratio between words. Large spacing is treated as column separator. Using this parameter you can control the column detection. | |
EnableTextAnalysis | Enables or disables extracted text analysis. Check TextAnalysisResults after the extraction for analysis results. | |
ExtractAnnotations | Sets whether to extract text from annotation objects. Default is true. | |
ExtractColumnByColumn | Sets whether we should reconstruct table structure or extract text objects as they go in the PDF document stream. Default is true. | |
ExtractInvisibleText | Sets whether to extract invisible text from a PDF document. | |
ExtractionColumns | Contains columns detected from last processed document page. | |
ExtractShadowLikeText | Sets whether to extract shadow-like text from a PDF document (when the same text is drawn twice with small offset). Default is 'true' - includes all decoded text, regardless of its appearance. | |
LineGroupingMode | Sets how lines are grouped into paragraphs. Default is None (no line grouping is performed). | |
NormalizeText | Set whether the extracted text should be normalized. Default is false. | |
OCRAutoModeMinExistingTextLength | Applies to OCRMode.Auto only. Sets the minimal total length of normal text objects on the current page to decide whether to perform OCR or not. If the length of the text is less than this value then extractor will use OCR for this page. Otherwise it extracts the existing normal text objects only. (Inherited from IBaseOCRExtractor.) | |
OCRBlackList | A set of characters not allowed to be recognized from scanned document. The resulting text will only contain characters that are not in this list. This helps improve uncertain recognition. (Inherited from IBaseOCRExtractor.) | |
OCRCacheMode | Sets caching of OCR results. Default is Off (no caching). In WholePage caching mode you can save processing time as the SDK will check if need to re-run OCR on the page or it can just pull results from previously cached OCR results. (Inherited from IBaseOCRExtractor.) | |
OCRCorrections | A set of corrections automatically applied to recognized text to fix repeating recognition errors. (Inherited from IBaseOCRExtractor.) | |
OCRDetectLines | Sets whether to detect horizontal and vertical lines during OCR. They help to detect the table structure in scanned documents. Default is false. (Inherited from IBaseOCRExtractor.) | |
OCRDetectPageRotation | Sets whether to detect scanned page rotation. Slightly slows down the processing. (Inherited from IBaseOCRExtractor.) | |
OCRDisableAutoSegmentation | Sets whether to disable the automatic segmentation. All pages will be treated as containing sparse text (as a typical document such as an invoice). (Inherited from IBaseOCRExtractor.) | |
OCRImagePreprocessingFilters | A set of corrections automatically applied to recognized text to fix repeating recognition errors. (Inherited from IBaseOCRExtractor.) | |
OCRLanguage | Language of OCR (Optical Character Recognition). The valid values are: (Inherited from IBaseOCRExtractor.)
Download more languages at https://github.com/bytescout/ocrdata. | |
OCRLanguageDataFolder | Folder containing OCR language data files. (Inherited from IBaseOCRExtractor.) | |
OCRMaximizeCPUUtilization | Gets or sets maximum OCR performance using Intel OpenMP (if available) to accelerate to approximately 30%. Default is false. (Inherited from IBaseOCRExtractor.) | |
OCRMode | Enables use of the OCR (Optical Character Recognition) which allows you to recognize text from images embedded in PDF pages. Set the language using the OCRLanguage property. (Inherited from IBaseOCRExtractor.)This option requires Bytescout.PDFExtractor.OCRExtension.dll assembly reference and relevant 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. | |
OCROverallConfidence | Gets overall OCR confidence. This value is calculated after the extraction is performed. (Inherited from IBaseOCRExtractor.) | |
OCRPageCount | Gets count of processed pages for which OCR was performed. This value is calculated after the extraction is finished. (Inherited from IBaseOCRExtractor.) | |
OCRResolution | Resolution of OCR (Optical Character Recognition). Default is 300 DPI. (Inherited from IBaseOCRExtractor.) | |
OCRWhiteList | A set of characters allowed to be recognized from scanned document. Only characters from this list will appear in the result text. This helps improve uncertain recognition. (Inherited from IBaseOCRExtractor.) | |
PreserveFormattingOnTextExtraction | Sets whether to preserve the text formatting on the extraction. | |
RemoveHyphenation | Sets whether to automatically remove hyphenations in end of lines (works when is true). | |
RotationAngle | Sets whether to rotate document pages to specified angle before the extraction. | |
RTLTextAutoDetectionEnabled | Enables RTL (Right-To-Left) text auto detection. Default is true. | |
ShrinkMultipleSpaces | Replaces multiple spaces in text objects with a single space. Multiple spaces affect column detection, so removing them may improve the result. Default is false. | |
TableXMinIntersectionRequiredInPercents | During the reconstruction of table structure, sets how much of the cell rectangle should intersect (by X coordinate axis) with the previous cell to treat both cells belong to the same row. | |
TableYMinIntersectionRequiredInPercents | During the reconstruction of table structure, sets how much of the cell rectangle should intersect (by Y coordinate axis) with the previous cell to treat both cells belong to the same column. | |
TextAnalysisCorruptedTextThreshold | The criterion of detection of the corrupted text used in text analysis. Default is 0.5. | |
TextAnalysisResults | Results of the text analysis. Enable the analysis using EnableTextAnalysis property. | |
TextEncodingCodePage | Sets the default text encoding. Default encoding is "iso-8859-1". | |
TrimSpaces | Sets whether to remove trailing and ending spaces from the text of table cells. Default is true. | |
Unwrap | Sets whether to unwrap the contents of a multiline table cell into a single line. Default is true. | |
XCoordinateToleranceFactor | Sets X coordinate tolerance to use when constructing table structure of PDF page. | |
YCoordinateToleranceFactor | Sets Y coordinate tolerance to use when constructing table structure of PDF page. |
Methods
Name | Description | |
---|---|---|
AddFilter(String, Boolean, Boolean) | Adds a filter to remove a text from extracted data. | |
AddFilter(String, Int32, Boolean) | Adds filter to exclude text objects with specified attributes. | |
AddFilter(String, Int32, Color, Boolean) | Adds filter to exclude text objects with specified attributes. | |
AddFilter(String, String, Boolean, Boolean) | Adds a filter to replace a text in extracted data. | |
AddFilter(String, Int32, Int32, Int32, Int32, Boolean) | Adds filter to exclude text objects with specified attributes. | |
DisposePage | 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. | |
GetPreprocessedPagePreview | Returns preview image of document page with preprocessing filters applied. | |
IsOCRRecommendedForPage | 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.) | |
ResetFilters | Reset text filters. | |
SavePreprocessedPagePreview | Saves preview image of document page with preprocessing filters applied. Image is saved in PNG format. | |
SetCustomExtractionColumns | Helper method to set CustomExtractionColumns property when using the extractor though COM from VC++ VB, VBA, VBScript, or Delphi. |
See Also