LoadOptions class
Leave feedback
On this page
The LoadOptions class allows specifying additional options (such as password) when opening a document to sign.
Set the password attribute to the document password if the file is encrypted.
The LoadOptions type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of LoadOptions class. |
| init | Initializes a new instance of the LoadOptions class with a specified file type. |
| Property | Description |
|---|---|
| file_type | The file type associated with the load options, defaulting to FileType.unknown. |
| load_external_resources | The flag that determines whether the document loads external resources. This property is obsolete; use LoadOptions.SkipExternalResources instead, which has the opposite meaning. |
| password | The password used to open a protected document and to save a signed document as protected. |
| permissions | The PDF document permissions such as printing, modification and data extraction. Only for PDF documents. |
| skip_external_resources | The flag that stops the document from loading external resources. The default value is True; external resources are not loaded except those that match LoadOptions.WhitelistedResources. |
| whitelisted_resources | The list of address fragments of external resources that are loaded even when LoadOptions.SkipExternalResources is true. The default value is an empty list. |
from groupdocs.signature import Signature
from groupdocs.signature.options import LoadOptions
load_options = LoadOptions()
load_options.password = "1234567890"
with Signature("protected.pdf", load_options) as signature:
info = signature.get_document_info()
print(f"{info.file_type.file_format}, {info.page_count} page(s), {info.size} bytes")
- module
groupdocs.signature.options
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.