Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfSanitizationOptions

OfficeIMO.Pdf

Namespace
OfficeIMO.Pdf
Assembly
OfficeIMO.Pdf
Source revision
551365f138da with working tree changes
Implements
IPdfOperationCancellation
Modifiers
sealed

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

Inheritance

  • object
  • PdfSanitizationOptions

Usage

Explore 3 API references to this type

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

Accepted by parameters 3

Constructors

public PdfSanitizationOptions() #

Properties

public long? 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 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 PdfSanitizationActionKind.Uri removes every URI target.

public 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 PdfSanitizationOptions.ActionKindsToRemove when the PdfSanitizationContentKind.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 bool RemoveRichMedia { get; set; } #

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