redactor

package
v3.0.0-...-55e877b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2023 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RectangleProps

type RectangleProps struct {
	FillColor   _dd.Color
	BorderWidth float64
	FillOpacity float64
}

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

type RedactionTerm struct{ Pattern *_f.Regexp }

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

func (_bfga *Redactor) Redact() error

Redact executes the redact operation on a pdf file and updates the content streams of all pages of the file.

func (*Redactor) Write

func (_cbd *Redactor) Write(writer _fa.Writer) error

Write writes the content of `re.creator` to writer of type io.Writer interface.

func (*Redactor) WriteToFile

func (_ceba *Redactor) WriteToFile(outputPath string) error

WriteToFile writes the redacted document to file specified by `outputPath`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL