public class LoadOptions extends Object
Learn more:
| Constructor and Description |
|---|
LoadOptions()
Initializes a new instance of the
class. |
LoadOptions(String password)
Initializes a new instance of the
class with a specified password. |
| Modifier and Type | Method and Description |
|---|---|
FileType |
getFileType()
Get the type of the file, indicating its type (e.g., docx, pdf, xlsx, etc.).
|
int |
getFormatFamily()
Get the format family of the document, indicating its type (e.g., Image, Pdf, Spreadsheet, etc.).
|
String |
getPassword()
Gets the password for opening an encrypted document.
|
void |
setFileType(FileType fileType)
Set the type of the file, indicating its type (e.g., docx, pdf, xlsx, etc.).
|
void |
setFormatFamily(int formatFamily)
Set the format family of the document, indicating its type (e.g., Image, Pdf, Spreadsheet, etc.).
|
void |
setPassword(String value)
Sets the password for opening an encrypted document.
|
public LoadOptions()
LoadOptions class.public LoadOptions(String password)
LoadOptions class with a specified password.password - The password for opening an encrypted content.public FileType getFileType()
public int getFormatFamily()
public final String getPassword()
public void setFileType(FileType fileType)
fileType - The file type.public void setFormatFamily(int formatFamily)
formatFamily - The file type.public final void setPassword(String value)
The password be null or empty string. The default value is null. If the content is not encrypted, set this to null or empty string.
The following example demonstrates how to load a document protected with a password.
LoadOptions loadOptions = new LoadOptions(); loadOptions.setPassword("pwd123"); Watermarker watermarker = new Watermarker("D:\\doc.vsdx", loadOptions); // ... watermarker.close();
value - The password for opening an encrypted document.Copyright © 2026. All rights reserved.