LoadOptions
Leave feedback
On this page
Inheritance: java.lang.Object
public class LoadOptions
Provides options that will be used to open a file.
Learn more
The following example demonstrates how to open password-protected document.
LoadOptions loadOptions = new LoadOptions("mysecretpassword");
try (Redactor redactor = new Redactor("PasswordProtected.pdf", loadOptions))
{
// work with document
}
| Constructor | Description |
|---|---|
| LoadOptions() | Initializes a new instance of LoadOptions class. |
| LoadOptions(String password) | Initializes a new instance of LoadOptions class with specified password. |
| LoadOptions(boolean preRasterize) | Initializes a new instance of LoadOptions class with specified pre-rasterization flag. |
| LoadOptions(String password, boolean preRasterize) | Initializes a new instance of LoadOptions class with specified password. |
| LoadOptions(String password, boolean preRasterize, DocumentFormatConfiguration documentFormatConfiguration) | Initializes a new instance of LoadOptions class with specified password. |
| Method | Description |
|---|---|
| getPassword() | Gets a password for password-protected documents. |
| setPassword(String value) | Sets a password for password-protected documents. |
| getDocumentFormatConfiguration() | Gets a document format configuration. |
| setDocumentFormatConfiguration(DocumentFormatConfiguration value) | Sets a document format configuration. |
| getPreRasterize() | Gets a value, indicating if the file is to be pre-rasterized. |
| setPreRasterize(boolean value) | Sets a value, indicating if the file is to be pre-rasterized. |
public LoadOptions()
Initializes a new instance of LoadOptions class.
public LoadOptions(String password)
Initializes a new instance of LoadOptions class with specified password.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| password | java.lang.String | Password for protected files |
public LoadOptions(boolean preRasterize)
Initializes a new instance of LoadOptions class with specified pre-rasterization flag.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| preRasterize | boolean | If true, force rasteization on loading |
public LoadOptions(String password, boolean preRasterize)
Initializes a new instance of LoadOptions class with specified password.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| password | java.lang.String | Password for protected files |
| preRasterize | boolean | If true, force rasteization on loading |
LoadOptions(String password, boolean preRasterize, DocumentFormatConfiguration documentFormatConfiguration)
public LoadOptions(String password, boolean preRasterize, DocumentFormatConfiguration documentFormatConfiguration)
Initializes a new instance of LoadOptions class with specified password.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| password | java.lang.String | Password for protected files |
| preRasterize | boolean | If true, force rasteization on loading |
| documentFormatConfiguration | DocumentFormatConfiguration | document format configuration |
public final String getPassword()
Gets a password for password-protected documents.
Returns: java.lang.String - A password for password-protected documents.
public final void setPassword(String value)
Sets a password for password-protected documents.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | A password for password-protected documents. |
public final DocumentFormatConfiguration getDocumentFormatConfiguration()
Gets a document format configuration.
Returns: DocumentFormatConfiguration - A document format configuration.
public final void setDocumentFormatConfiguration(DocumentFormatConfiguration value)
Sets a document format configuration.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | DocumentFormatConfiguration | A document format configuration. |
public final boolean getPreRasterize()
Gets a value, indicating if the file is to be pre-rasterized.
Returns: boolean - A value, indicating if the file is to be pre-rasterized.
public final void setPreRasterize(boolean value)
Sets a value, indicating if the file is to be pre-rasterized.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | A value, indicating if the file is to be pre-rasterized. |
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.