Class ImageImporter


  • public class ImageImporter
    extends Importer
    A subclass of Importer that allows bitmap images to be converted to PDF documents and loaded directly into the PDFViewer. This class handles all the formats supported by the PDFImage class, namely TIFF, PNG, GIF, JPEG, PNM and JPEG-2000. The name of this feature is ImageImporter

    This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.

    Since:
    2.10.2.
    • Constructor Detail

      • ImageImporter

        public ImageImporter()
    • Method Detail

      • isPDFImporter

        protected boolean isPDFImporter()
        Description copied from class: Importer
        Indicates whether this importer loads from a PDF document.
        Overrides:
        isPDFImporter in class Importer
      • matches

        public boolean matches​(File file)
                        throws IOException
        Description copied from class: Importer
        Return true if this Importer can load the specified file.
        Specified by:
        matches in class Importer
        Parameters:
        file - the File to be checked.
        Returns:
        true if this file can be loaded by this Importer, false otherwise
        Throws:
        IOException
      • canLoad

        public boolean canLoad​(String mimeType)
        Description copied from class: Importer
        Returns true if this importer can load a file or stream of the specified MIME Content-Type.
        Overrides:
        canLoad in class Importer
        Parameters:
        mimeType - the MIME content type