Table of Contents

Enum PdfSanitizeTargets

Namespace
LMKit.Document.Pdf
Assembly
LM-Kit.NET.dll

The document-level places a redacted PDF can still carry the removed information in, beside its pages. Redaction burns page content; these targets are stripped by Sanitize after the burn.

[Flags]
public enum PdfSanitizeTargets

Fields

None = 0

Nothing beside the pages is touched.

Metadata = 1

Every entry of the document information dictionary (title, author, subject, keywords, creator, producer, dates, custom entries) and the XMP metadata streams of the document and of every page.

Attachments = 2

Embedded files (the embedded files name tree, associated files and portable collections) and file attachment annotations.

JavaScript = 4

Document-level scripts, a JavaScript open action, and every JavaScript action attached to the document, its pages, its annotations and its form fields.

Outlines = 8

The outline (bookmarks), whose titles can repeat redacted text.

PieceInfo = 16

Private application data (/PieceInfo) of the document and its pages.

Xfa = 32

XFA form data, which carries its own copy of every field value.

Thumbnails = 64

Page thumbnail images, pictures of the page before redaction.

StructureText = 128

Alternate descriptions, replacement text, expansions and titles held by the structure tree of a tagged document. The tags themselves stay.

All = Metadata | Attachments | JavaScript | Outlines | PieceInfo | Xfa | Thumbnails | StructureText

Every target.

Examples

using LMKit.Document.Pdf;

var options = new PdfRedactionOptions
{
    // Everything except the bookmarks.
    Sanitize = PdfSanitizeTargets.All & ~PdfSanitizeTargets.Outlines
};
Share