Parser constructor

init

Initializes a new instance of the Parser class.

def __init__(self, file_path):
    ...
Parameter Type Description
file_path System.String The path to the file.

Example

The following example shows how to load the document from the local disk:

init

Initializes a new instance of the Parser class.

def __init__(self, document):
    ...
Parameter Type Description
document io.RawIOBase The source input stream.

Example

The following example shows how to load the document from the stream:

init

Initializes a new instance of the Parser class with LoadOptions.

def __init__(self, file_path, load_options):
    ...
Parameter Type Description
file_path System.String The path to the file.
load_options groupdocs.parser.options.LoadOptions The options to open the file.

Example

The document password is passed by LoadOptions class:

init

Initializes a new instance of the Parser class with ParserSettings.

def __init__(self, file_path, parser_settings):
    ...
Parameter Type Description
file_path System.String The path to the file.
parser_settings groupdocs.parser.options.ParserSettings The parser settings which are used to customize data extraction.

init

Initializes a new instance of the Parser class with LoadOptions.

def __init__(self, document, load_options):
    ...
Parameter Type Description
document io.RawIOBase The source input stream.
load_options groupdocs.parser.options.LoadOptions The options to open the file.

Example

In some cases it’s necessary to define FileFormat. Both for special cases (databases, email server) and for detecting file types by the content:

The document password is passed by LoadOptions class:

init

Initializes a new instance of the Parser class with ParserSettings.

def __init__(self, document, parser_settings):
    ...
Parameter Type Description
document io.RawIOBase The source input stream.
parser_settings groupdocs.parser.options.ParserSettings The parser settings which are used to customize data extraction.

init

Initializes a new instance of the Parser class with LoadOptions and ParserSettings.

def __init__(self, file_path, load_options, parser_settings):
    ...
Parameter Type Description
file_path System.String The path to the file.
load_options groupdocs.parser.options.LoadOptions The options to open the file.
parser_settings groupdocs.parser.options.ParserSettings The parser settings which are used to customize data extraction.

Example

The following example shows how to receive the information via ILogger interface:

init

Initializes a new instance of the Parser class with LoadOptions and ParserSettings.

def __init__(self, document, load_options, parser_settings):
    ...
Parameter Type Description
document io.RawIOBase The source input stream.
load_options groupdocs.parser.options.LoadOptions The options to open the file.
parser_settings groupdocs.parser.options.ParserSettings The parser settings which are used to customize data extraction.

Example

The following example shows how to receive the information via ILogger interface:

See Also