Package org.jpedal.manipulator
Class Redact
java.lang.Object
org.jpedal.manipulator.Redact
- All Implemented Interfaces:
org.jpedal.manipulator.Manipulation
Redacts text by removing the selected glyphs from the content stream in
such a way that the content can no longer be extracted from the PDF.
A black box is also drawn to cover the area where the text used to be.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatThe default percentage of a glyph's area that must be covered by the redaction rectangle for it to be redacted. -
Constructor Summary
ConstructorsConstructorDescriptionRedact(PdfManipulator pdfManipulator, PdfOptimizer pdfOptimizer, PageRanges pages, float[] rect) Perform text redaction on a subset of pages.Redact(PdfManipulator pdfManipulator, PdfOptimizer pdfOptimizer, PageRanges pages, float[] rect, float glyphCoverThreshold) Perform text redaction on a subset of pages. -
Method Summary
-
Field Details
-
DEFAULT_GLYPH_COVER_THRESHOLD
public static final float DEFAULT_GLYPH_COVER_THRESHOLDThe default percentage of a glyph's area that must be covered by the redaction rectangle for it to be redacted.- See Also:
-
-
Constructor Details
-
Redact
public Redact(PdfManipulator pdfManipulator, PdfOptimizer pdfOptimizer, PageRanges pages, float[] rect) Perform text redaction on a subset of pages.- Parameters:
pdfManipulator- the PdfManipulator object for the currently loaded documentpdfOptimizer- the PdfOptimizer object for the currently loaded documentpages- the pages to redactrect- text within this rectangle will be redacted. The rectangle takes the form llx, lly, urx, ury
-
Redact
public Redact(PdfManipulator pdfManipulator, PdfOptimizer pdfOptimizer, PageRanges pages, float[] rect, float glyphCoverThreshold) Perform text redaction on a subset of pages.- Parameters:
pdfManipulator- the PdfManipulator object for the currently loaded documentpdfOptimizer- the PdfOptimizer object for the currently loaded documentpages- the pages to redactrect- text within this rectangle will be redacted. The rectangle takes the form llx, lly, urx, uryglyphCoverThreshold- for a glyph to be redacted, the rectangle must cover at least this percentage of its area.
-