LoadOptions

Inheritance: java.lang.Object

public class LoadOptions

Represents document loading options when loading a document.

Learn more:

Constructors

Constructor Description
LoadOptions() Initializes a new instance of the [LoadOptions](../../com.groupdocs.watermark.options/loadoptions) class.
LoadOptions(String password) Initializes a new instance of the [LoadOptions](../../com.groupdocs.watermark.options/loadoptions) class with a specified password.

Methods

Method Description
getPassword() Gets the password for opening an encrypted document.
setPassword(String value) Sets the password for opening an encrypted document.

LoadOptions()

public LoadOptions()

Initializes a new instance of the [LoadOptions](../../com.groupdocs.watermark.options/loadoptions) class.

LoadOptions(String password)

public LoadOptions(String password)

Initializes a new instance of the [LoadOptions](../../com.groupdocs.watermark.options/loadoptions) class with a specified password.

Parameters:

Parameter Type Description
password java.lang.String The password for opening an encrypted content.

getPassword()

public final String getPassword()

Gets the password for opening an encrypted document.

Returns: java.lang.String - The password for opening an encrypted document.

setPassword(String value)

public final void setPassword(String value)

Sets the password for opening an encrypted document.

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();

Parameters:

Parameter Type Description
value java.lang.String The password for opening an encrypted document.