public class LoadOptions extends Object
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 and Description |
|---|
LoadOptions()
Initializes a new instance of LoadOptions class.
|
LoadOptions(boolean preRasterize)
Initializes a new instance of LoadOptions class with specified pre-rasterization flag.
|
LoadOptions(String password)
Initializes a new instance of LoadOptions class with specified password.
|
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.
|
| Modifier and Type | Method and Description |
|---|---|
DocumentFormatConfiguration |
getDocumentFormatConfiguration()
Gets a document format configuration.
|
String |
getPassword()
Gets a password for password-protected documents.
|
boolean |
getPreRasterize()
Gets a value, indicating if the file is to be pre-rasterized.
|
void |
setDocumentFormatConfiguration(DocumentFormatConfiguration value)
Sets a document format configuration.
|
void |
setPassword(String value)
Sets a password for password-protected documents.
|
void |
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(boolean preRasterize)
Initializes a new instance of LoadOptions class with specified pre-rasterization flag.
preRasterize - If true, force rasteization on loadingpublic LoadOptions(String password)
Initializes a new instance of LoadOptions class with specified password.
password - Password for protected filespublic LoadOptions(String password, boolean preRasterize)
Initializes a new instance of LoadOptions class with specified password.
password - Password for protected filespreRasterize - If true, force rasteization on loadingpublic LoadOptions(String password, boolean preRasterize, DocumentFormatConfiguration documentFormatConfiguration)
Initializes a new instance of LoadOptions class with specified password.
password - Password for protected filespreRasterize - If true, force rasteization on loadingdocumentFormatConfiguration - document format configurationpublic final DocumentFormatConfiguration getDocumentFormatConfiguration()
Gets a document format configuration.
public final String getPassword()
Gets a password for password-protected documents.
public final boolean getPreRasterize()
Gets a value, indicating if the file is to be pre-rasterized.
public final void setDocumentFormatConfiguration(DocumentFormatConfiguration value)
Sets a document format configuration.
value - A document format configuration.public final void setPassword(String value)
Sets a password for password-protected documents.
value - A password for password-protected documents.public final void setPreRasterize(boolean value)
Sets a value, indicating if the file is to be pre-rasterized.
value - A value, indicating if the file is to be pre-rasterized.Copyright © 2025. All rights reserved.