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 allPdfCleanUpLocationobjects from a givenPdfDocument.getPdfCleanUpLocations(com.itextpdf.kernel.pdf.PdfPage page) Get allPdfCleanUpLocationobjects from a givenPdfPage.voidhighlight(com.itextpdf.kernel.pdf.PdfDocument pdfDocument) Highlight areas of interest in a givenPdfDocumentvoidhighlight(com.itextpdf.kernel.pdf.PdfPage pdfPage) Highlight areas of interest in a givenPdfPagevoidtentativeCleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument) Perform tentative cleanup of areas of interest on a givenPdfDocumentThis method will add all redaction annotations to the given document, allowing the end-user to choose which redactions to keep or delete.voidtentativeCleanUp(com.itextpdf.kernel.pdf.PdfPage pdfPage) Perform tentative cleanup of areas of interest on a givenPdfPageThis 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- thePdfDocumentto be highlighted
-
highlight
public void highlight(com.itextpdf.kernel.pdf.PdfPage pdfPage) Highlight areas of interest in a givenPdfPage- Parameters:
-
pdfPage- thePdfPageto be highlighted
-
tentativeCleanUp
public void tentativeCleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument) Perform tentative cleanup of areas of interest on a givenPdfDocumentThis 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 givenPdfPageThis 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 allPdfCleanUpLocationobjects from a givenPdfPage.- Parameters:
-
page- thePdfPageto be processed - Returns:
-
a List of
PdfCleanUpLocationobjects
-
getPdfCleanUpLocations
Get allPdfCleanUpLocationobjects from a givenPdfDocument.- Parameters:
-
doc- thePdfDocumentto be processed - Returns:
-
a List of
PdfCleanUpLocationobjects
-