Skip to content

PDFContentRedactionOptions

Namespace: O2S.Components.PDF4NET.Redaction

Defines the options for redacting content in PDF files.

public class PDFContentRedactionOptions

Inheritance ObjectPDFContentRedactionOptions

Constructors

PDFContentRedactionOptions()

Initializes a new PDFTextExtractionContext object.

public PDFContentRedactionOptions()

Properties

ContentRedactType

Gets or sets the type of the redacted content.

public PDFContentRedactType ContentRedactType { get; set; }

Property Value

PDFContentRedactType
A PDFContentRedactType enum member specifying the type of content to be redacted.


DuplicateRedactedImages

Gets or sets a value indicating whether redacted images should be duplicated in the output.

public bool DuplicateRedactedImages { get; set; }

Property Value

Boolean
Set this property to true to duplicate the images that have been redacted. If set to false, the images are redacted in place.

Remarks

If a redacted image is used only once in the PDF file, then it is redacted in place regardless of the value of this property. If a redacted image is used multiple times in the PDF file, then it is duplicated and redacted only in the duplicated instance that matches the redaction area if this property is set to true. Otherwise, if this property is set to false, the original image is redacted in place and the redaction area will appear in all places where the image is displayed.


IncludePartialCharacters

Gets or sets a value indicating whether characters that fit partially the redaction area should be redacted.

public bool IncludePartialCharacters { get; set; }

Property Value

Boolean
If true then the characters that fit partially inside the redaction area are redacted.


RedactedPixelsColor

Gets or sets the pixels color in redacted images.

public PDFColor RedactedPixelsColor { get; set; }

Property Value

PDFColor
Color used for redacted pixels in an image.

Remarks

Note: The library will try to set the redacted pixels in an image to this color if possible. If not possible, the redacted pixels will be set to 0. Also due to the PDF internal color transformations that can be applied to an image, the final visible color of the redacted pixels might not match this color.


RedactionColor

Gets or sets the redaction color.

public PDFColor RedactionColor { get; set; }

Property Value

PDFColor
Color used for masking the redacted area.