com.itextpdf.text.pdf.pdfcleanup
Class PdfCleanUpProcessor

java.lang.Object
  extended by 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
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
PdfCleanUpProcessor(List<PdfCleanUpLocation> pdfCleanUpLocations, PdfStamper pdfStamper)
          Creates a PdfCleanUpProcessor object based on the given List of PdfCleanUpLocations representing regions to be erased from the document.
PdfCleanUpProcessor(PdfStamper pdfStamper)
          Creates a PdfCleanUpProcessor object.
 
Method Summary
 void cleanUp()
          Cleans the document by erasing all the areas which are either provided or extracted from redaction annotations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 a PdfCleanUpProcessor object based on the given List of PdfCleanUpLocations representing regions to be erased from the document.

Parameters:
pdfCleanUpLocations - list of locations to be cleaned up PdfCleanUpLocation
pdfStamper - APdfStamper object representing the document which redaction applies to.

PdfCleanUpProcessor

public PdfCleanUpProcessor(PdfStamper pdfStamper)
Creates a PdfCleanUpProcessor 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


Copyright © 2015. All Rights Reserved.