XLSExtractor ClassByteScout PDF Extractor SDK
Defines XLS extractor interface. Also able to extract data from PNG, JPEG, BMP and TIFF (single-page) images using Optical Character Recognition (OCR).
Inheritance Hierarchy

SystemObject
  Bytescout.PDFExtractorBaseExtractor
    Bytescout.PDFExtractorBaseTextExtractor
      Bytescout.PDFExtractorXLSExtractor

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

public class XLSExtractor : BaseTextExtractor, 
	IXLSExtractor

The XLSExtractor type exposes the following members.

Constructors

  NameDescription
Public methodXLSExtractor
Initializes a new instance of the XLSExtractor class.
Public methodXLSExtractor(String, String)
Initializes a new instance of the XLSExtractor class.
Top
Properties

  NameDescription
Public propertyAllowStandalonePunctuation
Gets or sets whether to allow standalone punctuation characters. If false they will be merged with nearest text object.
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.
(Inherited from BaseTextExtractor.)
Public propertyAutoDetectNumbers
Automatically detect numbers to represent properly (as numbers) in cells in XLS and XLSX output.
Public propertyCheckPermissions
Defines whether to respect permissions set by document owner. If True, extractor throws exception when the extraction is prohibited. IMPORTANT: THIS OPTION HAVE TO BE ENABLED AND SET TO "TRUE" TO RESPECT OWNERS OF PDF DOCUMENTS. IF YOU SET IT TO FALSE TO IGNORE PERMISSIONS WHICH ARE SET IN PDF DOCUMENT THEN YOU ARE SOLELY LIABLE FOR THIS ACTION AND ANY COPYRIGHT OR OTHER VIOLATIONS AT YOUR OWN RISK. BYTESCOUT IS NOT LIABLE FOR ANY DAMAGES, LOSSES, COPYRIGHT INFRINGEMENTS OR ANY OTHER CONSEQUENCES CAUSED BY IGNORING PERMISSIONS OF PDF DOCUMENT. BY CHANGING THIS OPTION YOU ARE CONFIRMING YOU ARE UNDERSTANDING ALL WRITTEN ABOVE AND DOING IT AT YOUR OWN RISK.
(Inherited from BaseExtractor.)
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.
(Inherited from BaseTextExtractor.)
Public propertyColumnDetectionMode
Sets how columns are detected. Default: ContentGroupsAndBorders (columns are detected based on content groups and borders (vertical lines)).
(Inherited from BaseTextExtractor.)
Public propertyComHelpers
Set of utility functions and properties to use from COM/ActiveX.
(Inherited from BaseExtractor.)
Public propertyConsiderFontColors
Consider font colors in document text when detecting table structure. False by default.
(Inherited from BaseTextExtractor.)
Public propertyConsiderFontNames
Consider font names in document text when detecting table structure. False by default.
(Inherited from BaseTextExtractor.)
Public propertyConsiderFontSizes
Consider font sizes in document text when detecting table structure. False by default.
(Inherited from BaseTextExtractor.)
Public propertyConsiderVerticalBorders
Consider vertical borders in document text when detecting table structure and merging text objects. True by default.
(Inherited from BaseTextExtractor.)
Public propertyContentType
Returns content type of PDF document: normal document, portfolio or XFA form. To extract files from PDF portfolio use AttachmentExtractor class. To extract XFA form content use XFAFormExtractor class.
(Inherited from BaseExtractor.)
Public propertyCustomExtractionColumns
Allows to override the automatic columns detection with custom columns.
(Inherited from BaseTextExtractor.)
Public propertyDetectLinesInsteadOfParagraphs Obsolete.
Lines detection option. Obsolete: Use LineGroupingMode instead.
(Inherited from BaseTextExtractor.)
Public propertyDetectNewColumnBySpacesRatio
Space ratio between words.
(Inherited from BaseTextExtractor.)
Public propertyEmbeddedFileCount Obsolete.
Property is disabled to speed up the document loading. Use AttachmentExtractor to work with attachments.
(Inherited from BaseExtractor.)
Public propertyEnableTextAnalysis
Enables or disables extracted text analysis. Check TextAnalysisResults after the extraction for analysis results.
(Inherited from BaseTextExtractor.)
Public propertyEncrypted
Gets whether the document is encrypted.
(Inherited from BaseExtractor.)
Public propertyExtractAnnotations
Gets or sets a value indicating whether to extract text from annotation objects. Default is true.
(Inherited from BaseTextExtractor.)
Public propertyExtractColumnByColumn
Gets or sets a value indicating whether to extract text column by column or use the visual layout of the text while extracting. False by default. if you are processing PDF newspapers with text columns, set this property to True so you get column by column instead of line by line
(Inherited from BaseTextExtractor.)
Public propertyExtractInvisibleText
Gets or sets a value indicating whether to extract invisible text from PDF document.
(Inherited from BaseTextExtractor.)
Public propertyExtractionArea
Sets the extraction area by coordinates and dimensions.
(Inherited from BaseExtractor.)
Public propertyExtractionAreaRect
Sets the extraction area by rectangle.
(Inherited from BaseExtractor.)
Public propertyExtractionAreaUsageMode
Controls how an extraction area (if any defined) is used when doing a text search to control if we are searching within any objects intersecting with an area or only within objects completely inside an area
(Inherited from BaseExtractor.)
Public propertyExtractionColumns
Contains columns detected from last processed document page.
(Inherited from BaseTextExtractor.)
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).
(Inherited from BaseTextExtractor.)
Public propertyIsDocumentLoaded
Get the document loaded state.
(Inherited from BaseExtractor.)
Public propertyLicenseInfo
Gets license information.
(Inherited from BaseExtractor.)
Public propertyLineGroupingMode
Sets how lines are grouped into paragraphs. Default: None (no lines grouping is performed).
(Inherited from BaseTextExtractor.)
Public propertyNumberDecimalSeparator
Number decimal separator.
Public propertyNumberGroupSeparator
Number group separator.
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 BaseTextExtractor.)
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 BaseTextExtractor.)
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 BaseTextExtractor.)
Public propertyOCRCorrections
Collection of corrections automatically applied to recognized text to fix repeating recognition errors.
(Inherited from BaseTextExtractor.)
Public propertyOCRDetectPageRotation
Gets or sets whether to detect scanned page rotation. Slightly slows down the processing time.
(Inherited from BaseTextExtractor.)
Public propertyOCRImagePreprocessingFilters
Collection of image processing filters applied to the document page before Optical Character Recognition (OCR). May improve the recognition quality.
(Inherited from BaseTextExtractor.)
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 BaseTextExtractor.)
Public propertyOCRLanguageDataFolder
Folder containing OCR language data files.
(Inherited from BaseTextExtractor.)
Public propertyOCRMaximizeCPUUtilization
Gets or sets maximum OCR performance using Intel OpenMP (if available) to accelerate to approximately 30%. Default is false.
(Inherited from BaseTextExtractor.)
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 BaseTextExtractor.)
Public propertyOCROverallConfidence
Gets overall OCR confidence. This value is calculated after the extraction is performed.
(Inherited from BaseTextExtractor.)
Public propertyOCRResolution
Resolution of Optical Character Recognition (OCR). Default is 300 DPI.
(Inherited from BaseTextExtractor.)
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 BaseTextExtractor.)
Public propertyOutputFormat
Gets or sets the output format (XLS or XLSX).
Public propertyPageDataCaching
Controls page data caching behavior.
(Inherited from BaseExtractor.)
Public propertyPageToWorksheet
Gets or sets whether to create separate worksheet for each page of PDF document.
Public propertyPassword
PDF document password.
(Inherited from BaseExtractor.)
Public propertyPreserveFormattingOnTextExtraction
Gets or sets a value indicating whether to preserve the text formatting on the extraction.
(Inherited from BaseTextExtractor.)
Public propertyProfiles
Comma-separated list of profiles to apply to the extractor. Profiles must be previously loaded.
(Inherited from BaseExtractor.)
Public propertyRegistrationKey
Registration key.
(Inherited from BaseExtractor.)
Public propertyRegistrationName
Registration name.
(Inherited from BaseExtractor.)
Public propertyRemoveHyphenation
Gets or sets a value indicating whether to automatically remove hyphenations in end of lines (works when Unwrap is True).
(Inherited from BaseTextExtractor.)
Public propertyRichTextFormatting
Enables/disables rich text formatting inside cells.
Public propertyRotationAngle
Gets or sets whether to rotate document pages to specified angle before the extraction.
(Inherited from BaseTextExtractor.)
Public propertyRTLTextAutoDetectionEnabled
Enables RTL (Right-To-Left) text auto detection. Default is true.
(Inherited from BaseTextExtractor.)
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.
(Inherited from BaseTextExtractor.)
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.
(Inherited from BaseTextExtractor.)
Public propertyTableYMinIntersectionRequiredInPercents
Y coordinate tolerance factor when working with stuctured (table) data. This option controls how much % of the cell rectangle (by Y coordinate) should intersect with row to belong to it.
(Inherited from BaseTextExtractor.)
Public propertyTextAnalysisCorruptedTextThreshold
The criterion of detection of the corrupted text used in text analysis. Default is 0.5.
(Inherited from BaseTextExtractor.)
Public propertyTextAnalysisResults
Results of the text analysis. Enable the analysis using EnableTextAnalysis property.
(Inherited from BaseTextExtractor.)
Public propertyTextEncodingCodePage
Sets the default text encoding. Default encoding is "iso-8859-1".
(Inherited from BaseTextExtractor.)
Public propertyTrimSpaces
Gets or sets a value indicating whether to remove trailing and ending spaces from table cell values.
(Inherited from BaseTextExtractor.)
Public propertyUnwrap
Gets or sets a value indicating whether to unwrap lines into single lines or not (especially could be useful in the column layout mode - see ExtractColumnByColumn property). Default is False.
(Inherited from BaseTextExtractor.)
Public propertyVersion
Gets the component version number.
(Inherited from BaseExtractor.)
Public propertyXCoordinateToleranceFactor
X coordinate tolerance factor.
(Inherited from BaseTextExtractor.)
Public propertyYCoordinateToleranceFactor
Y coordinate tolerance factor.
(Inherited from BaseTextExtractor.)
Top
Methods

  NameDescription
Public methodAddFilter(String, Boolean, Boolean)
Adds a filter to remove a text from extracted data.
(Inherited from BaseTextExtractor.)
Public methodAddFilter(String, Int32, Boolean)
Adds filter to exclude text objects with specified attributes.
(Inherited from BaseTextExtractor.)
Public methodAddFilter(String, Int32, Color, Boolean)
Adds filter to exclude text objects with specified attributes.
(Inherited from BaseTextExtractor.)
Public methodAddFilter(String, String, Boolean, Boolean)
Adds a filter to replace a text in extracted data.
(Inherited from BaseTextExtractor.)
Public methodAddFilter(String, Int32, Int32, Int32, Int32, Boolean)
Adds filter to exclude text objects with specified attributes.
(Inherited from BaseTextExtractor.)
Public methodCreateProfile(String, Boolean) (Inherited from BaseExtractor.)
Public methodCreateProfile(String, String, Boolean) (Inherited from BaseExtractor.)
Public methodDispose
Releases the unmanaged resources used by the instance and optionally releases the managed resources.
(Inherited from BaseExtractor.)
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.
(Inherited from BaseTextExtractor.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Protected methodFireParsingError (Inherited from BaseExtractor.)
Protected methodFireProgressChanged (Inherited from BaseExtractor.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetPageCount
Returns document page count.
(Inherited from BaseExtractor.)
Public methodGetPageRect_Height
Gets the specified page height.
(Inherited from BaseExtractor.)
Public methodGetPageRect_Left
Gets the specified page left coordinate.
(Inherited from BaseExtractor.)
Public methodGetPageRect_Top
Gets the specified page top coordinate.
(Inherited from BaseExtractor.)
Public methodGetPageRect_Width
Gets the specified page width.
(Inherited from BaseExtractor.)
Public methodGetPageRectangle(Int32)
Gets the page rectangle in PDF Points (1 Point = 1/72 in.).
(Inherited from BaseExtractor.)
Public methodGetPageRectangle(Int32, Boolean)
Gets the page rectangle in PDF Points (1 Point = 1/72 in.).
(Inherited from BaseExtractor.)
Public methodGetPageRotationAngle
Returns the rotation angle of specified page.
(Inherited from BaseExtractor.)
Public methodGetPreprocessedPagePreview
Returns preview image of document page with preprocessing filters applied.
(Inherited from BaseTextExtractor.)
Public methodGetType (Inherited from Object.)
Public methodIsEncrypted
Gets the document encrypted state.
(Inherited from BaseExtractor.)
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 BaseTextExtractor.)
Public methodLoadAndApplyProfiles
Loads profiles from JSON string and automatically applies them. Note that profiles containing detection keywords will be deferred until the extraction.
(Inherited from BaseExtractor.)
Public methodLoadDocumentFromFile
Loads PDF document from specified file.
(Inherited from BaseExtractor.)
Public methodLoadDocumentFromStream
Loads PDF document from provided stream.
(Inherited from BaseExtractor.)
Public methodLoadProfiles
Loads profiles from JSON file.
(Inherited from BaseExtractor.)
Public methodLoadProfilesFromString
Loads profiles from JSON string.
(Inherited from BaseExtractor.)
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodPerformTextAnalysis (Inherited from BaseTextExtractor.)
Public methodReset
Resets the instance and disposes internal resources. Also automatically invoked by Dispose.
(Inherited from BaseTextExtractor.)
Protected methodResetBaseExtractionData (Inherited from BaseTextExtractor.)
Public methodResetExtractionArea
Resets the extraction area to the full page.
(Inherited from BaseExtractor.)
Public methodResetFilters
Reset text filters.
(Inherited from BaseTextExtractor.)
Public methodSavePageToXLSFile
Saves document page text to Excel file. The spreadsheet format (XLS/XLSX) is defined by OutputFormat property.
Public methodSavePageToXLSStream
Saves document page text as Excel spreadsheet to stream. The spreadsheet format (XLS/XLSX) is defined by OutputFormat property.
Public methodSavePreprocessedPagePreview
Saves preview image of document page with preprocessing filters applied. Image is saved in PNG format.
(Inherited from BaseTextExtractor.)
Public methodSaveToXLSFile(String)
Saves document text as Excel file. The spreadsheet format (XLS/XLSX) is defined by OutputFormat property.
Public methodSaveToXLSFile(Int32, Int32, String)
Saves data from specified page range as Excel file. The spreadsheet format (XLS/XLSX) is defined by OutputFormat property.
Public methodSaveToXLSStream(Stream)
Saves document text as Excel spreadsheet to stream. The spreadsheet format (XLS/XLSX) is defined by OutputFormat property.
Public methodSaveToXLSStream(Int32, Int32, Stream)
Saves data from specified page range as Excel spreadsheet to stream. The spreadsheet format (XLS/XLSX) is defined by OutputFormat property.
Public methodSetCustomExtractionColumns
Helper method to set CustomExtractionColumns property when using the extractor though COM from VC++ VB, VBA, VBScript, or Delphi.
(Inherited from BaseTextExtractor.)
Public methodSetExtractionArea(RectangleF)
Sets the extraction area by rectangle.
(Inherited from BaseExtractor.)
Public methodSetExtractionArea(Double, Double, Double, Double)
Sets the extraction area by coordinates and dimensions.
(Inherited from BaseExtractor.)
Public methodSetExtractionArea(Single, Single, Single, Single)
Sets the extraction area by coordinates and dimensions.
(Inherited from BaseExtractor.)
Public methodToString (Inherited from Object.)
Top
Events

  NameDescription
Public eventParsingError
Raised on PDF document parsing errors. This usually indicates a damaged document.
(Inherited from BaseExtractor.)
Public eventPasswordRequired
Occurs when the password required to decrypt the document.
(Inherited from BaseExtractor.)
Public eventProgressChanged
Raised for each reported progress value. Allows to cancel the processing.
(Inherited from BaseExtractor.)
Top
Fields

  NameDescription
Protected fieldExtractionAreaInternal (Inherited from BaseExtractor.)
Top
See Also

Reference