public class PdfCleanUpTool extends Object
Modifier and Type | Field and Description |
---|---|
static double |
arcTolerance
Deprecated.
|
static double |
floatMultiplier
Deprecated.
|
Constructor and Description |
---|
PdfCleanUpTool(com.itextpdf.kernel.pdf.PdfDocument pdfDocument)
Creates a PdfCleanUpTool object.
|
PdfCleanUpTool(com.itextpdf.kernel.pdf.PdfDocument pdfDocument, boolean cleanRedactAnnotations)
Creates a PdfCleanUpTool object.
|
PdfCleanUpTool(com.itextpdf.kernel.pdf.PdfDocument pdfDocument, List<PdfCleanUpLocation> cleanUpLocations)
Creates a PdfCleanUpTool object based on the given List of PdfCleanUpLocation s representing regions to be erased from the document.
|
Modifier and Type | Method and Description |
---|---|
PdfCleanUpTool |
addCleanupLocation(PdfCleanUpLocation cleanUpLocation) |
void |
cleanUp()
Cleans the document by erasing all the areas which are either provided or extracted from redaction annotations.
|
boolean |
isProcessAnnotations()
Check if page annotations will be processed Default: True
|
PdfCleanUpTool |
setEventCountingMetaInfo(com.itextpdf.kernel.counter.event.IMetaInfo metaInfo)
Sets the cleanup meta info that will be passed to the EventCounter with PdfSweepEvent and can be used to determine event origin.
|
void |
setProcessAnnotations(boolean processAnnotations)
Set if page annotations will be processed Default processing behaviour: remove annotation if there is overlap with a redaction region
|
@Deprecated public static double floatMultiplier
@Deprecated public static double arcTolerance
public PdfCleanUpTool(com.itextpdf.kernel.pdf.PdfDocument pdfDocument)
PdfCleanUpTool
object. No regions for erasing are specified. Use addCleanupLocation(PdfCleanUpLocation)
method to set regions to be erased from the document.
pdfDocument
- A PdfDocument
object representing the document to which redaction applies.
public PdfCleanUpTool(com.itextpdf.kernel.pdf.PdfDocument pdfDocument, boolean cleanRedactAnnotations)
PdfCleanUpTool
object. If cleanRedactAnnotations
is true, regions to be erased are extracted from the redact annotations contained inside the given document. Those redact annotations will be removed from the resultant document. If cleanRedactAnnotations
is false, then no regions for erasing are specified. In that case use addCleanupLocation(PdfCleanUpLocation)
method to set regions to be erased from the document.
pdfDocument
- A PdfDocument
object representing the document to which redaction applies.
cleanRedactAnnotations
- if true - regions to be erased are extracted from the redact annotations contained inside the given document.
public PdfCleanUpTool(com.itextpdf.kernel.pdf.PdfDocument pdfDocument, List<PdfCleanUpLocation> cleanUpLocations)
PdfCleanUpTool
object based on the given List
of PdfCleanUpLocation
s representing regions to be erased from the document.
cleanUpLocations
- list of locations to be cleaned up PdfCleanUpLocation
pdfDocument
- A PdfDocument
object representing the document to which redaction applies.
public boolean isProcessAnnotations()
public void setProcessAnnotations(boolean processAnnotations)
processAnnotations
- if page annotations will be processed
public PdfCleanUpTool addCleanupLocation(PdfCleanUpLocation cleanUpLocation)
public PdfCleanUpTool setEventCountingMetaInfo(com.itextpdf.kernel.counter.event.IMetaInfo metaInfo)
EventCounter
with PdfSweepEvent
and can be used to determine event origin.
metaInfo
- the meta info to set.
public void cleanUp() throws IOException
IOException
- IOException
Copyright © 1998–2019 iText Group NV. All rights reserved.