SaveOptions
Inheritance: java.lang.Object
public class SaveOptions
Provides options for changing an output file name and/or converting the document to image-based PDF (rasterization).
Learn more
- Save with default options
- Save in rasterized PDF
- Select specific pages for rasterized PDF
- Save in original format
- Save overwriting original file
- Save to stream
Constructors
Constructor | Description |
---|---|
SaveOptions() | Initializes a new instance with defaults: rasterize to PDF - false, add suffix - false. |
SaveOptions(boolean rasterizeToPdf, String suffix) | Initializes a new instance with given parameters. |
Fields
Field | Description |
---|---|
SaveSuffix | Represents default suffix value, which is “Redacted”. |
Methods
Method | Description |
---|---|
getAddSuffix() | Gets a value indicating whether the file name needs to be changed before saving. |
setAddSuffix(boolean value) | Sets a value indicating whether the file name needs to be changed before saving. |
getRedactedFileSuffix() | Gets a custom suffix for output file name. |
setRedactedFileSuffix(String value) | Sets a custom suffix for output file name. |
getRasterizeToPDF() | Gets a value indicating whether all pages in the document need to be converted to images and put in a single PDF file. |
setRasterizeToPDF(boolean value) | Sets a value indicating whether all pages in the document need to be converted to images and put in a single PDF file. |
getRasterization() | Gets the rasterization settings. |
SaveOptions()
public SaveOptions()
Initializes a new instance with defaults: rasterize to PDF - false, add suffix - false.
SaveOptions(boolean rasterizeToPdf, String suffix)
public SaveOptions(boolean rasterizeToPdf, String suffix)
Initializes a new instance with given parameters.
Parameters:
Parameter | Type | Description |
---|---|---|
rasterizeToPdf | boolean | True, if all pages in the document need to be converted to images and put in a single PDF file |
suffix | java.lang.String | This text will be added to the end of file name, if not empty also sets AddSuffix to true |
SaveSuffix
public static final String SaveSuffix
Represents default suffix value, which is “Redacted”.
getAddSuffix()
public final boolean getAddSuffix()
Gets a value indicating whether the file name needs to be changed before saving. False by default.
Returns: boolean - A value indicating whether the file name needs to be changed before saving. False by default.
setAddSuffix(boolean value)
public final void setAddSuffix(boolean value)
Sets a value indicating whether the file name needs to be changed before saving. False by default.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | A value indicating whether the file name needs to be changed before saving. False by default. |
getRedactedFileSuffix()
public final String getRedactedFileSuffix()
Gets a custom suffix for output file name. If it is not specified, the SaveSuffix constant will be used.
Returns: java.lang.String - A custom suffix for output file name. If it is not specified, the SaveSuffix constant will be used.
setRedactedFileSuffix(String value)
public final void setRedactedFileSuffix(String value)
Sets a custom suffix for output file name. If it is not specified, the SaveSuffix constant will be used.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | A custom suffix for output file name. If it is not specified, the SaveSuffix constant will be used. |
getRasterizeToPDF()
public final boolean getRasterizeToPDF()
Gets a value indicating whether all pages in the document need to be converted to images and put in a single PDF file.
Returns: boolean - A value indicating whether all pages in the document need to be converted to images and put in a single PDF file.
setRasterizeToPDF(boolean value)
public final void setRasterizeToPDF(boolean value)
Sets a value indicating whether all pages in the document need to be converted to images and put in a single PDF file.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | A value indicating whether all pages in the document need to be converted to images and put in a single PDF file. |
getRasterization()
public final RasterizationOptions getRasterization()
Gets the rasterization settings.
Returns: RasterizationOptions - The rasterization settings.