Class PdfAutoSweepTools
java.lang.Object
com.itextpdf.pdfcleanup.autosweep.PdfAutoSweepTools
Class that automatically extracts all regions of interest from a given PdfDocument and redacts them.
-
Constructor Summary
ConstructorsConstructorDescriptionPdfAutoSweepTools
(ICleanupStrategy strategy) Construct a new instance of PdfAutoSweepTools with a given ICleanupStrategy -
Method Summary
Modifier and TypeMethodDescriptiongetPdfCleanUpLocations
(com.itextpdf.kernel.pdf.PdfDocument doc) Get allPdfCleanUpLocation
objects from a givenPdfDocument
.getPdfCleanUpLocations
(com.itextpdf.kernel.pdf.PdfPage page) Get allPdfCleanUpLocation
objects from a givenPdfPage
.void
highlight
(com.itextpdf.kernel.pdf.PdfDocument pdfDocument) Highlight areas of interest in a givenPdfDocument
void
highlight
(com.itextpdf.kernel.pdf.PdfPage pdfPage) Highlight areas of interest in a givenPdfPage
void
tentativeCleanUp
(com.itextpdf.kernel.pdf.PdfDocument pdfDocument) Perform tentative cleanup of areas of interest on a givenPdfDocument
This method will add all redaction annotations to the given document, allowing the end-user to choose which redactions to keep or delete.void
tentativeCleanUp
(com.itextpdf.kernel.pdf.PdfPage pdfPage) Perform tentative cleanup of areas of interest on a givenPdfPage
This method will add all redaction annotations to the given page, allowing the end-user to choose which redactions to keep or delete.
-
Constructor Details
-
PdfAutoSweepTools
Construct a new instance of PdfAutoSweepTools with a given ICleanupStrategy- Parameters:
-
strategy
- the redaction strategy to be used
-
-
Method Details
-
highlight
public void highlight(com.itextpdf.kernel.pdf.PdfDocument pdfDocument) Highlight areas of interest in a givenPdfDocument
- Parameters:
-
pdfDocument
- thePdfDocument
to be highlighted
-
highlight
public void highlight(com.itextpdf.kernel.pdf.PdfPage pdfPage) Highlight areas of interest in a givenPdfPage
- Parameters:
-
pdfPage
- thePdfPage
to be highlighted
-
tentativeCleanUp
public void tentativeCleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument) Perform tentative cleanup of areas of interest on a givenPdfDocument
This method will add all redaction annotations to the given document, allowing the end-user to choose which redactions to keep or delete.- Parameters:
-
pdfDocument
- the document to clean up
-
tentativeCleanUp
public void tentativeCleanUp(com.itextpdf.kernel.pdf.PdfPage pdfPage) Perform tentative cleanup of areas of interest on a givenPdfPage
This method will add all redaction annotations to the given page, allowing the end-user to choose which redactions to keep or delete.- Parameters:
-
pdfPage
- the page to clean up
-
getPdfCleanUpLocations
Get allPdfCleanUpLocation
objects from a givenPdfPage
.- Parameters:
-
page
- thePdfPage
to be processed - Returns:
-
a List of
PdfCleanUpLocation
objects
-
getPdfCleanUpLocations
Get allPdfCleanUpLocation
objects from a givenPdfDocument
.- Parameters:
-
doc
- thePdfDocument
to be processed - Returns:
-
a List of
PdfCleanUpLocation
objects
-