Class SanitizeOptions

public class SanitizeOptions : OptionsWithInputAndOutput, IHaveInput

Inheritance

objectOptionsWithInputOptionsWithInputAndOutputSanitizeOptions

Implements

Inherited Members

Constructors

SanitizeOptions()

Initializes a new instance of the Documentize.SanitizeOptions object with default options.

public SanitizeOptions()

SanitizeOptions(IData, IData)

Initializes a new instance of the Documentize.SanitizeOptions object with the specified input data.

public SanitizeOptions(IData inputData, IData outputData = null)

Parameters

  • inputData IData: The input data.
  • outputData IData: The output data.

SanitizeOptions(string, string)

Initializes a new instance of the Documentize.SanitizeOptions object with the specified input and output files.

public SanitizeOptions(string inputFile, string outputFile)

Parameters

  • inputFile string: The input file path.
  • outputFile string: The output file path.

SanitizeOptions(Stream, Stream)

Initializes a new instance of the Documentize.SanitizeOptions object with the specified input and output streams.

public SanitizeOptions(Stream inputStream, Stream outputStream)

Parameters

  • inputStream Stream: The input stream.
  • outputStream Stream: The output stream.

SanitizeOptions(string, Stream)

Initializes a new instance of the Documentize.SanitizeOptions object with the specified input file and output stream.

public SanitizeOptions(string inputFile, Stream outputStream)

Parameters

  • inputFile string: The input file path.
  • outputStream Stream: The output stream.

SanitizeOptions(Stream, string)

Initializes a new instance of the Documentize.SanitizeOptions object with the specified input stream and output file.

public SanitizeOptions(Stream inputStream, string outputFile)

Parameters

  • inputStream Stream: The input stream.
  • outputFile string: The output file path.

Properties

ConvertPagesToImages

Gets or sets the option to convert pages to images. The conversion of pages to images will occur after clearing the main hidden data, which is controlled by other options.

public bool ConvertPagesToImages { get; set; }

Property Value

bool

FlattenForms

Gets or sets a value indicating whether forms in the document should be flattened during the sanitization process. Flattening forms converts interactive form fields into static content, making them non-editable or fillable.

public bool FlattenForms { get; set; }

Property Value

bool

FlattenLayers

Gets or sets the option to flatten the layers in the PDF document. When enabled, all layers in the document are merged into a single layer, removing their separate structure. This option is useful for sanitizing documents by simplifying their content and ensuring no hidden data resides within layers.

public bool FlattenLayers { get; set; }

Property Value

bool

ImageDpi

Gets or sets the option to resolve page images during pages to image conversion. The property works if the Documentize.SanitizeOptions.ConvertPagesToImages property is true .

public int ImageDpi { get; set; }

Property Value

int

Input

Gets or sets Input Data.

public override IData Input { get; set; }

Property Value

IData

Output

Gets or sets Output Data.

public override IData Output { get; set; }

Property Value

IData

RemoveAnnotations

Gets or sets a value indicating whether to remove annotations from the document. When enabled, all annotations present in the document will be removed during the sanitization process. Redact annotations will be applied.

public bool RemoveAnnotations { get; set; }

Property Value

bool

RemoveAttachments

Gets or sets the option to remove all attached files from the document. When enabled, it ensures that any attachments within the PDF are eliminated during the sanitation process.

public bool RemoveAttachments { get; set; }

Property Value

bool

RemoveJavaScriptsAndActions

Gets or sets a value indicating whether JavaScript and associated actions should be removed from the document. This option is useful to eliminate potential security vulnerabilities introduced by embedded scripts.

public bool RemoveJavaScriptsAndActions { get; set; }

Property Value

bool

RemoveMetadata

Gets or sets an option to remove metadata from the document. If set to true, metadata such as document properties and additional embedded metadata information will be removed during sanitization.

public bool RemoveMetadata { get; set; }

Property Value

bool

RemoveSearchIndexAndPrivateInfo

Gets or sets a value indicating whether the search index and private information should be removed from the document. Enables the removal of embedded search indices and private data to enhance document security and privacy.

public bool RemoveSearchIndexAndPrivateInfo { get; set; }

Property Value

bool

Namespace: Documentize Assembly: Documentize.dll

 English