Enum PdfSanitizeTargets
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 = 0Nothing beside the pages is touched.
Metadata = 1Every 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 = 2Embedded files (the embedded files name tree, associated files and portable collections) and file attachment annotations.
JavaScript = 4Document-level scripts, a JavaScript open action, and every JavaScript action attached to the document, its pages, its annotations and its form fields.
Outlines = 8The outline (bookmarks), whose titles can repeat redacted text.
PieceInfo = 16Private application data (/PieceInfo) of the document and its pages.
Xfa = 32XFA form data, which carries its own copy of every field value.
Thumbnails = 64Page thumbnail images, pictures of the page before redaction.
StructureText = 128Alternate 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 | StructureTextEvery target.
Examples
using LMKit.Document.Pdf;
var options = new PdfRedactionOptions
{
// Everything except the bookmarks.
Sanitize = PdfSanitizeTargets.All & ~PdfSanitizeTargets.Outlines
};