Class PdfCleanUpProcessor
java.lang.Object
com.itextpdf.text.pdf.pdfcleanup.PdfCleanUpProcessor
Represents the main mechanism for cleaning a PDF document.
- Since:
- 5.5.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic doubleUsed as the criterion of a good approximation of rounded line joins and line caps.static booleanstatic doubleWhen a document with line arts is being cleaned up, there are lot of calculations with floating point numbers. -
Constructor Summary
ConstructorsConstructorDescriptionPdfCleanUpProcessor(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
Modifier and TypeMethodDescriptionvoidcleanUp()Cleans the document by erasing all the areas which are either provided or extracted from redaction annotations.
-
Field Details
-
floatMultiplier
public static double floatMultiplierWhen 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 arcToleranceUsed as the criterion of a good approximation of rounded line joins and line caps.
-
-
Constructor Details
-
PdfCleanUpProcessor
Creates aPdfCleanUpProcessorobject based on the givenListofPdfCleanUpLocations representing regions to be erased from the document.- Parameters:
pdfCleanUpLocations- list of locations to be cleaned uppdfStamper- APdfStamperobject representing the document which redaction applies to.
-
PdfCleanUpProcessor
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 Details
-
cleanUp
Cleans the document by erasing all the areas which are either provided or extracted from redaction annotations.- Throws:
IOExceptionDocumentException
-