API Reference

Class

PdfSanitizationOptions

Namespace OfficeIMO.Pdf
Assembly OfficeIMO.Pdf
Modifiers sealed

Explicit policy for removing active content and embedded payloads from a PDF.

Inheritance

  • Object
  • PdfSanitizationOptions

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters

Constructors

Properties

public CancellationToken CancellationToken { get; set; } #

Cancellation observed between inventory, object-graph rewrite, and verification stages.

public Nullable<Int64> MaximumOutputBytes { get; set; } #

Optional maximum byte count for the sanitized full-rewrite artifact.

public ISet<String> AllowedActionTypes { get; } #

Action types that may remain. Values are PDF action names without a leading slash.

public Nullable<PdfSanitizationActionKind> ActionKindsToRemove { get; set; } #

Exact action kinds to remove. When null, the existing default policy removes known active-content actions and only URI targets whose schemes are not allowed. When set, unselected action kinds are preserved and selecting Uri removes every URI target.

public Nullable<PdfSanitizationContentKind> ContentKindsToRemove { get; set; } #

Exact before-sharing content categories to remove. When null, the established sanitizer behavior is retained. When set, unselected categories remain. Action selection is further narrowed by ActionKindsToRemove when the Actions category is selected.

public ISet<String> AllowedUriSchemes { get; } #

Absolute URI schemes that may remain. Relative URI targets are preserved.

public PdfEmbeddedFileSanitizationMode EmbeddedFiles { get; set; } #

How embedded and associated files are removed. Defaults to removal without retaining payload bytes.

public Boolean RemoveRichMedia { get; set; } #

When true, rich-media and payload-bearing annotations are removed from page annotation arrays.