Package com.itextpdf.text.pdf.pdfcleanup
Class PdfCleanUpProcessor
- java.lang.Object
-
- com.itextpdf.text.pdf.pdfcleanup.PdfCleanUpProcessor
-
public class PdfCleanUpProcessor extends Object
Represents the main mechanism for cleaning a PDF document.- Since:
- 5.5.4
-
-
Field Summary
Fields Modifier and Type Field Description static double
arcTolerance
Used as the criterion of a good approximation of rounded line joins and line caps.static boolean
fillCleanedArea
static double
floatMultiplier
When a document with line arts is being cleaned up, there are lot of calculations with floating point numbers.
-
Constructor Summary
Constructors Constructor Description PdfCleanUpProcessor(PdfStamper pdfStamper)
Creates aPdfCleanUpProcessor
object.PdfCleanUpProcessor(List<PdfCleanUpLocation> pdfCleanUpLocations, PdfStamper pdfStamper)
Creates aPdfCleanUpProcessor
object based on the givenList
ofPdfCleanUpLocation
s representing regions to be erased from the document.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
Cleans the document by erasing all the areas which are either provided or extracted from redaction annotations.
-
-
-
Field Detail
-
floatMultiplier
public static double floatMultiplier
When a document with line arts is being cleaned up, there are lot of calculations with floating point numbers. All of them are translated into fixed point numbers by multiplying by this coefficient. Vary it to adjust the preciseness of the calculations.
-
fillCleanedArea
public static boolean fillCleanedArea
-
arcTolerance
public static double arcTolerance
Used as the criterion of a good approximation of rounded line joins and line caps.
-
-
Constructor Detail
-
PdfCleanUpProcessor
public PdfCleanUpProcessor(List<PdfCleanUpLocation> pdfCleanUpLocations, PdfStamper pdfStamper)
Creates aPdfCleanUpProcessor
object based on the givenList
ofPdfCleanUpLocation
s representing regions to be erased from the document.- Parameters:
pdfCleanUpLocations
- list of locations to be cleaned up {@see PdfCleanUpLocation}pdfStamper
- APdfStamper
object representing the document which redaction applies to.
-
PdfCleanUpProcessor
public PdfCleanUpProcessor(PdfStamper pdfStamper)
Creates aPdfCleanUpProcessor
object. Regions to be erased from the document are extracted from the redact annotations contained inside the given document.- Parameters:
pdfStamper
- APdfStamper
object representing the document which redaction applies to.
-
-
Method Detail
-
cleanUp
public void cleanUp() throws IOException, DocumentException
Cleans the document by erasing all the areas which are either provided or extracted from redaction annotations.- Throws:
IOException
DocumentException
-
-