SaveOptions Class |
Namespace: GroupDocs.Redaction.Options
The SaveOptions type exposes the following members.
Name | Description | |
---|---|---|
![]() | SaveOptions |
Initializes a new instance with defaults: rasterize to PDF - false, add suffix - false.
|
![]() | SaveOptions(Boolean, String) |
Initializes a new instance with given parameters.
|
Name | Description | |
---|---|---|
![]() | AddSuffix |
Gets or sets a value indicating whether the file name needs to be changed before saving. False by default.
|
![]() | Rasterization |
Gets the rasterization settings.
|
![]() | RasterizeToPDF |
Gets or sets a value indicating whether all pages in the document need to be converted to images and put in a single PDF file.
|
![]() | RedactedFileSuffix |
Gets or sets a custom suffix for output file name. If it is not specified, the SaveSuffix constant will be used.
|
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
Name | Description | |
---|---|---|
![]() ![]() | SaveSuffix |
Represents default suffix value, which is "Redacted".
|
The following example demonstrates how to save a document using SaveOptions.
using (Redactor redactor = new Redactor(@"C:\sample.pdf")) { // Document redaction goes here // ... // Save the document with default options (convert pages into images, save as PDF) redactor.Save(); // Save the document in original format overwriting original file redactor.Save(new SaveOptions() { AddSuffix = false, RasterizeToPDF = false }); // Save the document to "*_Redacted.*" file in original format redactor.Save(new SaveOptions() { AddSuffix = true, RasterizeToPDF = false }); // Save the document to "*_AnyText.*" (e.g. timestamp instead of "AnyText") in its file name without rasterization redactor.Save(new SaveOptions(false, "AnyText")); }