Class PdfCleanUpTool

java.lang.Object
com.itextpdf.pdfcleanup.PdfCleanUpTool

public class PdfCleanUpTool extends Object
Represents the main mechanism for cleaning a PDF document.
  • Field Details

    • floatMultiplier

      @Deprecated public static double floatMultiplier
      Deprecated.
      When a document with line arts is being cleaned up, there are a 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.
    • arcTolerance

      @Deprecated public static double arcTolerance
      Deprecated.
      Used as the criterion of a good approximation of rounded line joins and line caps.
  • Constructor Details

    • PdfCleanUpTool

      public PdfCleanUpTool (com.itextpdf.kernel.pdf.PdfDocument pdfDocument)
      Creates a PdfCleanUpTool object. No regions for erasing are specified. Use addCleanupLocation(PdfCleanUpLocation) method to set regions to be erased from the document.
      Parameters:
      pdfDocument - A PdfDocument object representing the document to which redaction applies.
    • PdfCleanUpTool

      public PdfCleanUpTool (com.itextpdf.kernel.pdf.PdfDocument pdfDocument, boolean cleanRedactAnnotations, CleanUpProperties properties)
      Creates a 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.
      Parameters:
      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
      properties - additional properties for clean-up process inside the given document.
    • PdfCleanUpTool

      public PdfCleanUpTool (com.itextpdf.kernel.pdf.PdfDocument pdfDocument, List<PdfCleanUpLocation> cleanUpLocations, CleanUpProperties properties)
      Creates a PdfCleanUpTool object based on the given List of PdfCleanUpLocations representing regions to be erased from the document.
      Parameters:
      cleanUpLocations - list of locations to be cleaned up PdfCleanUpLocation
      pdfDocument - a PdfDocument object representing the document to which redaction applies.
      properties - additional properties for clean-up process
  • Method Details