__init__ constructor
Leave feedback
On this page
Initializes a new instance of LoadOptions class.
def __init__(self):
...
Initializes a new LoadOptions instance with the specified file type.
def __init__(self, file_type):
...
| Parameter | Type | Description |
|---|---|---|
| file_type | FileType |
The type of the file to open. |
| Raises | Description |
|---|---|
ValueError |
If file_type is None. |
from groupdocs.redaction import FileType
from groupdocs.redaction.options import LoadOptions
load_opts = LoadOptions(FileType.DOCX)
Initializes a new LoadOptions instance with the specified password.
def __init__(self, password):
...
| Parameter | Type | Description |
|---|---|---|
| password | str |
Password for protected files. |
from groupdocs.redaction.options import LoadOptions
# Load a password‑protected document
load_opt = LoadOptions("mypassword")
```
## __init__ {#pre_rasterize}
Initializes a new LoadOptions instance with a pre‑rasterization flag.
```python
def __init__(self, pre_rasterize):
...
| Parameter | Type | Description |
|---|---|---|
| pre_rasterize | bool |
If True, force rasterization on loading. |
Initializes a new LoadOptions instance with an optional password and an optional pre‑rasterization flag.
def __init__(self, password, pre_rasterize):
...
| Parameter | Type | Description |
|---|---|---|
| password | str |
Password for protected files. |
| pre_rasterize | bool |
If True, force rasterization on loading. |
- class
LoadOptions
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.