Class PdfImageXObjectPredicate

java.lang.Object
com.itextpdf.pdfoptimizer.handlers.util.PdfImageXObjectPredicate
All Implemented Interfaces:
IPdfObjectPredicate

public class PdfImageXObjectPredicate extends Object implements IPdfObjectPredicate
Checks if current PdfObject is a PdfImageXObject.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    customCondition(com.itextpdf.kernel.pdf.PdfObject object)
    When overridden allows to provide custom condition on images which match the predicate.
    final boolean
    test(com.itextpdf.kernel.pdf.PdfObject object)
    Checks that current object is a PdfStream and has key PdfName.Subtype associated with value PdfName.Image.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PdfImageXObjectPredicate

      public PdfImageXObjectPredicate()
  • Method Details

    • test

      public final boolean test (com.itextpdf.kernel.pdf.PdfObject object)
      Checks that current object is a PdfStream and has key PdfName.Subtype associated with value PdfName.Image. If optional key PdfName.Type is presented it should be associated with the value PdfName.XObject.
      Specified by:
      test in interface IPdfObjectPredicate
      Parameters:
      object - is an argument
      Returns:
      is a result of evaluation
    • customCondition

      public boolean customCondition (com.itextpdf.kernel.pdf.PdfObject object)
      When overridden allows to provide custom condition on images which match the predicate.
      Parameters:
      object - is an image dictionary
      Returns:
      true for every object