Class CCITTFactory


  • public final class CCITTFactory
    extends Object
    Factory for creating a PDImageXObject containing a CCITT Fax compressed TIFF image.
    • Method Detail

      • createFromRandomAccess

        @Deprecated
        public static PDImageXObject createFromRandomAccess​(PDDocument document,
                                                            RandomAccess reader)
                                                     throws IOException
        Deprecated.
        Creates a new CCITT Fax compressed Image XObject from the first page of a TIFF file.
        Parameters:
        document - the document to create the image as part of.
        reader - the random access TIFF file which contains a suitable CCITT compressed image
        Returns:
        a new Image XObject
        Throws:
        IOException - if there is an error reading the TIFF data.
      • createFromRandomAccess

        @Deprecated
        public static PDImageXObject createFromRandomAccess​(PDDocument document,
                                                            RandomAccess reader,
                                                            int number)
                                                     throws IOException
        Deprecated.
        Creates a new CCITT Fax compressed Image XObject from a TIFF file.
        Parameters:
        document - the document to create the image as part of.
        reader - the random access TIFF file which contains a suitable CCITT compressed image
        number - TIFF image number, starting from 0
        Returns:
        a new Image XObject, or null if no such page
        Throws:
        IOException - if there is an error reading the TIFF data.
      • createFromFile

        public static PDImageXObject createFromFile​(PDDocument document,
                                                    File file)
                                             throws IOException
        Creates a new CCITT Fax compressed Image XObject from the first page of a TIFF file.
        Parameters:
        document - the document to create the image as part of.
        file - the TIFF file which contains a suitable CCITT compressed image
        Returns:
        a new Image XObject
        Throws:
        IOException - if there is an error reading the TIFF data.
      • createFromFile

        public static PDImageXObject createFromFile​(PDDocument document,
                                                    File file,
                                                    int number)
                                             throws IOException
        Creates a new CCITT Fax compressed Image XObject from the first page of a TIFF file.
        Parameters:
        document - the document to create the image as part of.
        file - the TIFF file which contains a suitable CCITT compressed image
        number - TIFF image number, starting from 0 compressed image
        Returns:
        a new Image XObject
        Throws:
        IOException - if there is an error reading the TIFF data.