Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RectangleProps ¶
RectangleProps defines properties of the redaction rectangle to be drawn.
func RedactRectanglePropsNew ¶
func RedactRectanglePropsNew() *RectangleProps
RedactRectanglePropsNew return a new pointer to a default RectangleProps object.
type RedactionOptions ¶
type RedactionOptions struct{ Terms []RedactionTerm }
RedactionOptions is a collection of RedactionTerm objects.
type RedactionTerm ¶
RedactionTerm holds the regexp pattern and the replacement string for the redaction process.
type Redactor ¶
type Redactor struct {
// contains filtered or unexported fields
}
Redactor represtents a Redactor object.
func New ¶
func New(reader *_ab.PdfReader, opts *RedactionOptions, rectProps *RectangleProps) *Redactor
New instantiates a Redactor object with given PdfReader and `regex` pattern.
func (*Redactor) Redact ¶
Redact executes the redact operation on a pdf file and updates the content streams of all pages of the file.
func (*Redactor) Write ¶
Write writes the content of `re.creator` to writer of type io.Writer interface.
func (*Redactor) WriteToFile ¶
WriteToFile writes the redacted document to file specified by `outputPath`.