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 applies
outputPdf
- the cleaned up pdf document OutputStream
cleanUpLocations
- list of locations to be cleaned up
IOException
- if an I/O error occurs
public static void cleanUp(InputStream inputPdf, OutputStream outputPdf, List<PdfCleanUpLocation> cleanUpLocations, CleanUpProperties properties) throws IOException
inputPdf
- the pdf document InputStream to which cleaned up applies
outputPdf
- the cleaned up pdf document OutputStream
cleanUpLocations
- list of locations to be cleaned up
properties
- additional properties for cleanUp
IOException
- if an I/O error occurs
public static void cleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument, List<PdfCleanUpLocation> cleanUpLocations) throws IOException
pdfDocument
- a document to which cleaned up applies
cleanUpLocations
- list of locations to be cleaned up
IOException
- if an I/O error occurs
public static void cleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument, List<PdfCleanUpLocation> cleanUpLocations, CleanUpProperties properties) throws IOException
pdfDocument
- a document to which cleaned up applies
cleanUpLocations
- list of locations to be cleaned up
properties
- additional properties for cleanUp
IOException
- if an I/O error occurs
public static void autoSweepCleanUp(InputStream inputPdf, OutputStream outputPdf, ICleanupStrategy strategy) throws IOException
inputPdf
- the pdf document InputStream to which cleaned up applies
outputPdf
- the cleaned up pdf document OutputStream
strategy
- cleanup strategy to be used
IOException
- if an I/O error occurs
public static void autoSweepCleanUp(InputStream inputPdf, OutputStream outputPdf, ICleanupStrategy strategy, List<PdfCleanUpLocation> additionalCleanUpLocations) throws IOException
inputPdf
- the pdf document InputStream to which cleaned up applies
outputPdf
- the cleaned up pdf document OutputStream
strategy
- cleanup strategy to be used
additionalCleanUpLocations
- list of additional locations to be cleaned up
IOException
- if an I/O error occurs
public static void autoSweepCleanUp(InputStream inputPdf, OutputStream outputPdf, ICleanupStrategy strategy, CleanUpProperties properties) throws IOException
inputPdf
- the pdf document InputStream to which cleaned up applies
outputPdf
- the cleaned up pdf document OutputStream
strategy
- cleanup strategy to be used
properties
- additional properties for cleanUp
IOException
- if an I/O error occurs
public 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 applies
outputPdf
- the cleaned up pdf document OutputStream
strategy
- cleanup strategy to be used
additionalCleanUpLocations
- list of additional locations to be cleaned up
properties
- additional properties for cleanUp
IOException
- if an I/O error occurs
public static void autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument, ICleanupStrategy strategy) throws IOException
pdfDocument
- a document to which cleaned up applies
strategy
- cleanup strategy to be used
IOException
- if an I/O error occurs
public static void autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument, ICleanupStrategy strategy, CleanUpProperties properties) throws IOException
pdfDocument
- a document to which cleaned up applies
strategy
- cleanup strategy to be used
properties
- additional properties for cleanUp
IOException
- if an I/O error occurs
public static void autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfDocument pdfDocument, ICleanupStrategy strategy, List<PdfCleanUpLocation> additionalCleanUpLocations) throws IOException
pdfDocument
- a document to which cleaned up applies
strategy
- cleanup strategy to be used
additionalCleanUpLocations
- list of additional locations to be cleaned up
IOException
- if an I/O error occurs
public 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 applies
strategy
- cleanup strategy to be used
additionalCleanUpLocations
- list of additional locations to be cleaned up
properties
- additional properties for cleanUp
IOException
- if an I/O error occurs
public static void autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfPage pdfPage, ICleanupStrategy strategy) throws IOException
pdfPage
- the PdfPage
to which cleaned up applies
strategy
- cleanup strategy to be used
IOException
- if an I/O error occurs
public static void autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfPage pdfPage, ICleanupStrategy strategy, List<PdfCleanUpLocation> additionalCleanUpLocations) throws IOException
pdfPage
- the PdfPage
to which cleaned up applies
strategy
- cleanup strategy to be used
additionalCleanUpLocations
- list of additional locations to be cleaned up
IOException
- if an I/O error occurs
public static void autoSweepCleanUp(com.itextpdf.kernel.pdf.PdfPage pdfPage, ICleanupStrategy strategy, CleanUpProperties properties) throws IOException
pdfPage
- the PdfPage
to which cleaned up applies
strategy
- cleanup strategy to be used
properties
- additional properties for cleanUp
IOException
- if an I/O error occurs
public 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 applies
strategy
- cleanup strategy to be used
additionalCleanUpLocations
- list of additional locations to be cleaned up
properties
- additional properties for cleanUp
IOException
- if an I/O error occurs
public static void cleanUpRedactAnnotations(InputStream inputPdf, OutputStream outputPdf) throws IOException
inputPdf
- the pdf document InputStream to which cleaned up applies
outputPdf
- the cleaned up pdf document OutputStream
IOException
- if an I/O error occurs
public static void cleanUpRedactAnnotations(InputStream inputPdf, OutputStream outputPdf, CleanUpProperties properties) throws IOException
inputPdf
- the pdf document InputStream to which cleaned up applies
outputPdf
- the cleaned up pdf document OutputStream
properties
- additional properties for cleanUp
IOException
- if an I/O error occurs
public static void cleanUpRedactAnnotations(com.itextpdf.kernel.pdf.PdfDocument pdfDocument) throws IOException
pdfDocument
- a document to which cleaned up applies
IOException
- if an I/O error occurs
public static void cleanUpRedactAnnotations(com.itextpdf.kernel.pdf.PdfDocument pdfDocument, CleanUpProperties properties) throws IOException
pdfDocument
- a document to which cleaned up applies
properties
- additional properties for cleanUp
IOException
- if an I/O error occurs
public static void cleanUpRedactAnnotations(InputStream inputPdf, OutputStream outputPdf, List<PdfCleanUpLocation> additionalCleanUpLocations) throws IOException
inputPdf
- the pdf document InputStream to which cleaned up applies
outputPdf
- the cleaned up pdf document OutputStream
additionalCleanUpLocations
- list of locations to be cleaned up
IOException
- if an I/O error occurs
public static void cleanUpRedactAnnotations(com.itextpdf.kernel.pdf.PdfDocument pdfDocument, List<PdfCleanUpLocation> additionalCleanUpLocations) throws IOException
pdfDocument
- a document to which cleaned up applies
additionalCleanUpLocations
- list of locations to be cleaned up
IOException
- if an I/O error occurs
public static void cleanUpRedactAnnotations(InputStream inputPdf, OutputStream outputPdf, List<PdfCleanUpLocation> additionalCleanUpLocations, CleanUpProperties properties) throws IOException
inputPdf
- the pdf document InputStream to which cleaned up applies
outputPdf
- the cleaned up pdf document OutputStream
additionalCleanUpLocations
- list of locations to be cleaned up
properties
- additional properties for cleanUp
IOException
- if an I/O error occurs
public static void cleanUpRedactAnnotations(com.itextpdf.kernel.pdf.PdfDocument pdfDocument, List<PdfCleanUpLocation> additionalCleanUpLocations, CleanUpProperties properties) throws IOException
pdfDocument
- a document to which cleaned up applies
additionalCleanUpLocations
- list of locations to be cleaned up
properties
- additional properties for cleanUp
IOException
- if an I/O error occurs
Copyright © 1998–2022 iText Group NV. All rights reserved.