SaveOptions
Leave feedback
On this page
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
| 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. |
| Field | Description |
|---|---|
| SaveSuffix | Represents default suffix value, which is “Redacted”. |
| 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. |
public SaveOptions()
Initializes a new instance with defaults: rasterize to PDF - false, add suffix - false.
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 |
public static final String SaveSuffix
Represents default suffix value, which is “Redacted”.
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.
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. |
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.
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. |
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.
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. |
public final RasterizationOptions getRasterization()
Gets the rasterization settings.
Returns: RasterizationOptions - The rasterization settings.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.