SaveOptions Class
Provides options for changing an output file name and/or converting the document to image-based PDF (rasterization).
Inheritance Hierarchy
SystemObject
  GroupDocs.Redaction.OptionsSaveOptions

Namespace: GroupDocs.Redaction.Options
Assembly: GroupDocs.Redaction (in GroupDocs.Redaction.dll) Version: 20.7
Syntax
public class SaveOptions

The SaveOptions type exposes the following members.

Constructors
  NameDescription
Public methodSaveOptions
Initializes a new instance with defaults: rasterize to PDF - false, add suffix - false.
Public methodSaveOptions(Boolean, String)
Initializes a new instance with given parameters.
Properties
  NameDescription
Public propertyAddSuffix
Gets or sets a value indicating whether the file name needs to be changed before saving. False by default.
Public propertyRasterization
Gets the rasterization settings.
Public propertyRasterizeToPDF
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.
Public propertyRedactedFileSuffix
Gets or sets a custom suffix for output file name. If it is not specified, the SaveSuffix constant will be used.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Fields
  NameDescription
Public fieldStatic memberSaveSuffix
Represents default suffix value, which is "Redacted".
Remarks
Examples

The following example demonstrates how to save a document using SaveOptions.

C#
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"));
}
See Also