public final class PdfCleaner extends Object
InputStream
or already opened PdfDocument and performs erasing of data in regions specified by input
arguments. The output can either be preserved in passed PdfDocument with possibility to
post-process the document, or in an OutputStream in a form of a complete PDF file.
The important difference between overloads with InputStream/OutputStream parameters and
PdfDocument parameter is in the consumption of product license limits.
| Modifier and Type | Method and Description |
|---|---|
static void |
autoSweepCleanUp(InputStream inputPdf,
OutputStream outputPdf,
ICleanupStrategy strategy)
Perform cleanup of areas of interest based on a given cleanup strategy.
|
static void |
autoSweepCleanUp(InputStream inputPdf,
OutputStream outputPdf,
ICleanupStrategy strategy,
CleanUpProperties properties)
Perform cleanup of areas of interest based on a given cleanup strategy.
|
static void |
autoSweepCleanUp(InputStream inputPdf,
OutputStream outputPdf,
ICleanupStrategy strategy,
List<PdfCleanUpLocation> additionalCleanUpLocations)
Perform cleanup of areas of interest based on a given cleanup strategy.
|
static void |
autoSweepCleanUp(InputStream inputPdf,
OutputStream outputPdf,
ICleanupStrategy strategy,
List<PdfCleanUpLocation> additionalCleanUpLocations,
CleanUpProperties properties)
Perform cleanup of areas of interest based on a given cleanup strategy.
|
static void |
autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
ICleanupStrategy strategy)
Perform cleanup of areas of interest based on a given cleanup strategy.
|
static void |
autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
ICleanupStrategy strategy,
CleanUpProperties properties)
Perform cleanup of areas of interest based on a given cleanup strategy.
|
static void |
autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
ICleanupStrategy strategy,
List<PdfCleanUpLocation> additionalCleanUpLocations)
Perform cleanup of areas of interest based on a given cleanup strategy.
|
static void |
autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
ICleanupStrategy strategy,
List<PdfCleanUpLocation> additionalCleanUpLocations,
CleanUpProperties properties)
Perform cleanup of areas of interest based on a given cleanup strategy.
|
static void |
autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfPage pdfPage,
ICleanupStrategy strategy)
Perform cleanup of areas of interest based on a given cleanup strategy.
|
static void |
autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfPage pdfPage,
ICleanupStrategy strategy,
CleanUpProperties properties)
Perform cleanup of areas of interest based on a given cleanup strategy.
|
static void |
autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfPage pdfPage,
ICleanupStrategy strategy,
List<PdfCleanUpLocation> additionalCleanUpLocations)
Perform cleanup of areas of interest based on a given cleanup strategy.
|
static void |
autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfPage pdfPage,
ICleanupStrategy strategy,
List<PdfCleanUpLocation> additionalCleanUpLocations,
CleanUpProperties properties)
Perform cleanup of areas of interest based on a given cleanup strategy.
|
static void |
cleanUp(InputStream inputPdf,
OutputStream outputPdf,
List<PdfCleanUpLocation> cleanUpLocations)
Cleans the document by erasing all the areas which are provided.
|
static void |
cleanUp(InputStream inputPdf,
OutputStream outputPdf,
List<PdfCleanUpLocation> cleanUpLocations,
CleanUpProperties properties)
Cleans the document by erasing all the areas which are provided.
|
static void |
cleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
List<PdfCleanUpLocation> cleanUpLocations)
Cleans the document by erasing all the areas which are provided.
|
static void |
cleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
List<PdfCleanUpLocation> cleanUpLocations,
CleanUpProperties properties)
Cleans the document by erasing all the areas which are provided.
|
static void |
cleanUpRedactAnnotations(InputStream inputPdf,
OutputStream outputPdf)
Cleans the document by erasing regions defined by redact annotations inside the document.
|
static void |
cleanUpRedactAnnotations(InputStream inputPdf,
OutputStream outputPdf,
CleanUpProperties properties)
Cleans the document by erasing regions defined by redact annotations inside the document.
|
static void |
cleanUpRedactAnnotations(InputStream inputPdf,
OutputStream outputPdf,
List<PdfCleanUpLocation> additionalCleanUpLocations)
Cleans the document by erasing regions defined by redact annotations and additional cleanup locations inside the
document.
|
static void |
cleanUpRedactAnnotations(InputStream inputPdf,
OutputStream outputPdf,
List<PdfCleanUpLocation> additionalCleanUpLocations,
CleanUpProperties properties)
Cleans the document by erasing regions defined by redact annotations inside the document.
|
static void |
cleanUpRedactAnnotations(com.itextpdf.kernel.pdf.PdfDocument pdfDocument)
Cleans the document by erasing regions defined by redact annotations inside the document.
|
static void |
cleanUpRedactAnnotations(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
CleanUpProperties properties)
Cleans the document by erasing regions defined by redact annotations inside the document.
|
static void |
cleanUpRedactAnnotations(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
List<PdfCleanUpLocation> additionalCleanUpLocations)
Cleans the document by erasing regions defined by redact annotations and additional cleanup locations inside the
document.
|
static void |
cleanUpRedactAnnotations(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
List<PdfCleanUpLocation> additionalCleanUpLocations,
CleanUpProperties properties)
Cleans the document by erasing regions defined by redact annotations inside the document.
|
public static void cleanUp(InputStream inputPdf, OutputStream outputPdf, List<PdfCleanUpLocation> cleanUpLocations) throws IOException
inputPdf - the pdf document InputStream to which cleaned up appliesoutputPdf - the cleaned up pdf document OutputStreamcleanUpLocations - list of locations to be cleaned upIOException - if an I/O error occurspublic static void cleanUp(InputStream inputPdf, OutputStream outputPdf, List<PdfCleanUpLocation> cleanUpLocations, CleanUpProperties properties) throws IOException
inputPdf - the pdf document InputStream to which cleaned up appliesoutputPdf - the cleaned up pdf document OutputStreamcleanUpLocations - list of locations to be cleaned upproperties - additional properties for cleanUpIOException - if an I/O error occurspublic static void cleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
List<PdfCleanUpLocation> cleanUpLocations)
throws IOException
pdfDocument - a document to which cleaned up appliescleanUpLocations - list of locations to be cleaned upIOException - if an I/O error occurspublic static void cleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
List<PdfCleanUpLocation> cleanUpLocations,
CleanUpProperties properties)
throws IOException
pdfDocument - a document to which cleaned up appliescleanUpLocations - list of locations to be cleaned upproperties - additional properties for cleanUpIOException - if an I/O error occurspublic static void autoSweepCleanUp(InputStream inputPdf, OutputStream outputPdf, ICleanupStrategy strategy) throws IOException
inputPdf - the pdf document InputStream to which cleaned up appliesoutputPdf - the cleaned up pdf document OutputStreamstrategy - cleanup strategy to be usedIOException - if an I/O error occurspublic static void autoSweepCleanUp(InputStream inputPdf, OutputStream outputPdf, ICleanupStrategy strategy, List<PdfCleanUpLocation> additionalCleanUpLocations) throws IOException
inputPdf - the pdf document InputStream to which cleaned up appliesoutputPdf - the cleaned up pdf document OutputStreamstrategy - cleanup strategy to be usedadditionalCleanUpLocations - list of additional locations to be cleaned upIOException - if an I/O error occurspublic static void autoSweepCleanUp(InputStream inputPdf, OutputStream outputPdf, ICleanupStrategy strategy, CleanUpProperties properties) throws IOException
inputPdf - the pdf document InputStream to which cleaned up appliesoutputPdf - the cleaned up pdf document OutputStreamstrategy - cleanup strategy to be usedproperties - additional properties for cleanUpIOException - if an I/O error occurspublic static void autoSweepCleanUp(InputStream inputPdf, OutputStream outputPdf, ICleanupStrategy strategy, List<PdfCleanUpLocation> additionalCleanUpLocations, CleanUpProperties properties) throws IOException
inputPdf - the pdf document InputStream to which cleaned up appliesoutputPdf - the cleaned up pdf document OutputStreamstrategy - cleanup strategy to be usedadditionalCleanUpLocations - list of additional locations to be cleaned upproperties - additional properties for cleanUpIOException - if an I/O error occurspublic static void autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
ICleanupStrategy strategy)
throws IOException
pdfDocument - a document to which cleaned up appliesstrategy - cleanup strategy to be usedIOException - if an I/O error occurspublic static void autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
ICleanupStrategy strategy,
CleanUpProperties properties)
throws IOException
pdfDocument - a document to which cleaned up appliesstrategy - cleanup strategy to be usedproperties - additional properties for cleanUpIOException - if an I/O error occurspublic static void autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
ICleanupStrategy strategy,
List<PdfCleanUpLocation> additionalCleanUpLocations)
throws IOException
pdfDocument - a document to which cleaned up appliesstrategy - cleanup strategy to be usedadditionalCleanUpLocations - list of additional locations to be cleaned upIOException - if an I/O error occurspublic static void autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
ICleanupStrategy strategy,
List<PdfCleanUpLocation> additionalCleanUpLocations,
CleanUpProperties properties)
throws IOException
pdfDocument - a document to which cleaned up appliesstrategy - cleanup strategy to be usedadditionalCleanUpLocations - list of additional locations to be cleaned upproperties - additional properties for cleanUpIOException - if an I/O error occurspublic static void autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfPage pdfPage,
ICleanupStrategy strategy)
throws IOException
pdfPage - the PdfPage to which cleaned up appliesstrategy - cleanup strategy to be usedIOException - if an I/O error occurspublic static void autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfPage pdfPage,
ICleanupStrategy strategy,
List<PdfCleanUpLocation> additionalCleanUpLocations)
throws IOException
pdfPage - the PdfPage to which cleaned up appliesstrategy - cleanup strategy to be usedadditionalCleanUpLocations - list of additional locations to be cleaned upIOException - if an I/O error occurspublic static void autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfPage pdfPage,
ICleanupStrategy strategy,
CleanUpProperties properties)
throws IOException
pdfPage - the PdfPage to which cleaned up appliesstrategy - cleanup strategy to be usedproperties - additional properties for cleanUpIOException - if an I/O error occurspublic static void autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfPage pdfPage,
ICleanupStrategy strategy,
List<PdfCleanUpLocation> additionalCleanUpLocations,
CleanUpProperties properties)
throws IOException
pdfPage - the PdfPage to which cleaned up appliesstrategy - cleanup strategy to be usedadditionalCleanUpLocations - list of additional locations to be cleaned upproperties - additional properties for cleanUpIOException - if an I/O error occurspublic static void cleanUpRedactAnnotations(InputStream inputPdf, OutputStream outputPdf) throws IOException
inputPdf - the pdf document InputStream to which cleaned up appliesoutputPdf - the cleaned up pdf document OutputStreamIOException - if an I/O error occurspublic static void cleanUpRedactAnnotations(InputStream inputPdf, OutputStream outputPdf, CleanUpProperties properties) throws IOException
inputPdf - the pdf document InputStream to which cleaned up appliesoutputPdf - the cleaned up pdf document OutputStreamproperties - additional properties for cleanUpIOException - if an I/O error occurspublic static void cleanUpRedactAnnotations(com.itextpdf.kernel.pdf.PdfDocument pdfDocument)
throws IOException
pdfDocument - a document to which cleaned up appliesIOException - if an I/O error occurspublic static void cleanUpRedactAnnotations(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
CleanUpProperties properties)
throws IOException
pdfDocument - a document to which cleaned up appliesproperties - additional properties for cleanUpIOException - if an I/O error occurspublic static void cleanUpRedactAnnotations(InputStream inputPdf, OutputStream outputPdf, List<PdfCleanUpLocation> additionalCleanUpLocations) throws IOException
inputPdf - the pdf document InputStream to which cleaned up appliesoutputPdf - the cleaned up pdf document OutputStreamadditionalCleanUpLocations - list of locations to be cleaned upIOException - if an I/O error occurspublic static void cleanUpRedactAnnotations(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
List<PdfCleanUpLocation> additionalCleanUpLocations)
throws IOException
pdfDocument - a document to which cleaned up appliesadditionalCleanUpLocations - list of locations to be cleaned upIOException - if an I/O error occurspublic static void cleanUpRedactAnnotations(InputStream inputPdf, OutputStream outputPdf, List<PdfCleanUpLocation> additionalCleanUpLocations, CleanUpProperties properties) throws IOException
inputPdf - the pdf document InputStream to which cleaned up appliesoutputPdf - the cleaned up pdf document OutputStreamadditionalCleanUpLocations - list of locations to be cleaned upproperties - additional properties for cleanUpIOException - if an I/O error occurspublic static void cleanUpRedactAnnotations(com.itextpdf.kernel.pdf.PdfDocument pdfDocument,
List<PdfCleanUpLocation> additionalCleanUpLocations,
CleanUpProperties properties)
throws IOException
pdfDocument - a document to which cleaned up appliesadditionalCleanUpLocations - list of locations to be cleaned upproperties - additional properties for cleanUpIOException - if an I/O error occursCopyright © 1998–2024 Apryse Group NV. All rights reserved.