Class CompressionOptimizer

java.lang.Object
com.itextpdf.pdfoptimizer.AbstractOptimizationHandler
com.itextpdf.pdfoptimizer.handlers.CompressionOptimizer

public class CompressionOptimizer extends AbstractOptimizationHandler
Performs maximal compression of every PdfStream and full compression of the PdfDocument.
  • Constructor Details

    • CompressionOptimizer

      public CompressionOptimizer()
  • Method Details

    • optimizePdf

      protected void optimizePdf (com.itextpdf.kernel.pdf.PdfDocument document, OptimizationSession session)
      Description copied from class: AbstractOptimizationHandler
      Performs an optimization of the document. The method is not designed to be invoked directly. For a correct optimization process use methods of PdfOptimizer class.
      Specified by:
      optimizePdf in class AbstractOptimizationHandler
      Parameters:
      document - is the PDF document to optimize. Invocation of the method can change the state of the object
      session - is an auxiliary object used to support share data between stages of optimization process