LoadOptions

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
 }
 

Constructors

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.

Methods

Method Description
getPassword() Gets a password for password-protected documents.
setPassword(String value) Sets a password for password-protected documents.
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.

LoadOptions()

public LoadOptions()

Initializes a new instance of LoadOptions class.

LoadOptions(String password)

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

LoadOptions(boolean preRasterize)

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

LoadOptions(String password, boolean preRasterize)

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

getPassword()

public final String getPassword()

Gets a password for password-protected documents.

Returns: java.lang.String - A password for password-protected documents.

setPassword(String value)

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.

getPreRasterize()

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.

setPreRasterize(boolean value)

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.