Click or drag to resize
Pdf Library for .NET

PdfRedactionManager Methods

The PdfRedactionManager type exposes the following members.

Methods
 NameDescription
Public methodAddRedaction(Regex) Marks every match of a regular expression, on every page, for redaction - for text that follows a pattern rather than a known value, such as account numbers or e-mail addresses. The matches are also taken out of what the document stores without showing it, as for a text.
Public methodAddRedaction(Int32, RectangleF) Marks a rectangle on a page for redaction, covered with FillColor.
Public methodAddRedaction(Regex, Int32) Marks every match of a regular expression on the given pages for redaction. With pageIndexesnull it is the same as the overload without pages, which also reaches what the document stores off its pages; with pages named, only those pages are changed.
Public methodAddRedaction(Int32, RectangleF, PdfColor) Marks a rectangle on a page for redaction, covered with the given color.
Public methodAddRedaction(String, Boolean, Boolean) Marks every occurrence of a text, on every page, for redaction. The text is also taken out of what the document stores without showing it - properties, metadata, bookmarks, annotation and form field text, attachments.
Public methodAddRedaction(String, Boolean, Boolean, Int32) Marks every occurrence of a text on the given pages for redaction. With pageIndexesnull it is the same as the overload without pages, which also reaches what the document stores off its pages; with pages named, only those pages are changed.
Public methodCloseCloses the loaded document and releases its resources.
Public methodGetDocument Returns the redacted document as a new PdfDocument for further processing. Areas marked and not yet applied are applied first.
Public methodLoad(Byte)Loads a PDF document from a byte array.
Public methodLoad(PdfDocument)Loads an existing PdfDocument.
Public methodLoad(Stream)Loads a PDF document from a stream.
Public methodLoad(String)Loads a PDF document from a file.
Public methodLoad(Byte, String)Loads a password-protected PDF document from a byte array.
Public methodLoad(PdfDocument, String)Loads an existing password-protected PdfDocument.
Public methodLoad(Stream, String)Loads a password-protected PDF document from a stream.
Public methodLoad(String, String)Loads a password-protected PDF document from a file.
Public methodRedact Applies every area marked since the last call and returns what was redacted: one result per rectangle, including one per occurrence of each text.
Public methodSave Saves the redacted document and returns its bytes. Areas marked and not yet applied are applied first.
Public methodSave(Stream) Saves the redacted document to a stream. Areas marked and not yet applied are applied first.
Public methodSave(String) Saves the redacted document to a file. Areas marked and not yet applied are applied first.
Top
See Also