org.faceless.pdf2.viewer2.feature
Class ImageImporter

java.lang.Object
  extended by org.faceless.pdf2.viewer2.ViewerFeature
      extended by org.faceless.pdf2.viewer2.Importer
          extended by org.faceless.pdf2.viewer2.feature.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.

Nested Class Summary
 
Nested classes/interfaces inherited from class org.faceless.pdf2.viewer2.Importer
Importer.ImporterTask
 
Constructor Summary
ImageImporter()
           
 
Method Summary
 FileFilter getFileFilter()
          Get a FileFilter that can be used to choose files acceptable to this Importer.
 Importer.ImporterTask getImporter(PDFViewer viewer, File file)
          Return an Importer.ImporterTask that will load a PDF into the viewer from the specifed File.
 Importer.ImporterTask getImporter(PDFViewer viewer, InputStream in, String title, File file)
          Return an Importer.ImporterTask that will load a PDF into the viewer from the specifed InputStream.
 boolean matches(File file)
          Return true if this Importer can load the specified file.
 
Methods inherited from class org.faceless.pdf2.viewer2.Importer
getImporter, getParser, processPDF
 
Methods inherited from class org.faceless.pdf2.viewer2.ViewerFeature
getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getFeatureURLProperty, getName, initialize, isEnabledByDefault, setFeatureName, teardown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageImporter

public ImageImporter()
Method Detail

getFileFilter

public FileFilter getFileFilter()
Description copied from class: Importer
Get a FileFilter that can be used to choose files acceptable to this Importer.

Specified by:
getFileFilter 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

getImporter

public Importer.ImporterTask getImporter(PDFViewer viewer,
                                         File file)
Description copied from class: Importer
Return an Importer.ImporterTask that will load a PDF into the viewer from the specifed File.

Specified by:
getImporter in class Importer
Parameters:
viewer - the PDFViewer
file - the FILE to load the PDF from
Returns:
an Importer.ImporterTask to load the PDF

getImporter

public Importer.ImporterTask getImporter(PDFViewer viewer,
                                         InputStream in,
                                         String title,
                                         File file)
Description copied from class: Importer
Return an Importer.ImporterTask that will load a PDF into the viewer from the specifed InputStream.

Specified by:
getImporter in class Importer
Parameters:
viewer - the PDFViewer
in - the InputStream to load the PDF from
title - the title to give that PDF - may be null
file - if the PDF is later saved, the file to initialize the path to - may be null.
Returns:
an Importer.ImporterTask to load the PDF


Copyright © 2001-2013 Big Faceless Organization