Parser constructor
Leave feedback
On this page
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. |
The following example shows how to load the document from the local disk:
Initializes a new instance of the Parser class.
def __init__(self, document):
...
| Parameter | Type | Description |
|---|---|---|
| document | io.RawIOBase | The source input stream. |
The following example shows how to load the document from the stream:
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. |
The document password is passed by LoadOptions class:
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. |
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. |
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:
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. |
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. |
The following example shows how to receive the information via ILogger interface:
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. |
The following example shows how to receive the information via ILogger interface:
- module
groupdocs.parser - class
FileFormat - class
ILogger - class
LoadOptions - class
Parser - class
ParserSettings
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.