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 doublearcToleranceUsed as the criterion of a good approximation of rounded line joins and line caps.static booleanfillCleanedAreastatic doublefloatMultiplierWhen 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 aPdfCleanUpProcessorobject.PdfCleanUpProcessor(List<PdfCleanUpLocation> pdfCleanUpLocations, PdfStamper pdfStamper)Creates aPdfCleanUpProcessorobject based on the givenListofPdfCleanUpLocations representing regions to be erased from the document.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp()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 aPdfCleanUpProcessorobject based on the givenListofPdfCleanUpLocations representing regions to be erased from the document.- Parameters:
pdfCleanUpLocations- list of locations to be cleaned up {@see PdfCleanUpLocation}pdfStamper- APdfStamperobject representing the document which redaction applies to.
-
PdfCleanUpProcessor
public PdfCleanUpProcessor(PdfStamper pdfStamper)
Creates aPdfCleanUpProcessorobject. Regions to be erased from the document are extracted from the redact annotations contained inside the given document.- Parameters:
pdfStamper- APdfStamperobject representing the document which redaction applies to.
-
-
Method Detail
-
cleanUp
public void cleanUp() throws IOException, DocumentExceptionCleans the document by erasing all the areas which are either provided or extracted from redaction annotations.- Throws:
IOExceptionDocumentException
-
-