org.faceless.pdf2.viewer2.feature
Class ImageImporter
java.lang.Object
org.faceless.pdf2.viewer2.ViewerFeature
org.faceless.pdf2.viewer2.Importer
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.
Methods inherited from class org.faceless.pdf2.viewer2.ViewerFeature |
getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getFeatureURLProperty, getName, initialize, isEnabledByDefault, setFeatureName, teardown, toString |
ImageImporter
public ImageImporter()
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 PDFViewerfile
- 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 PDFViewerin
- the InputStream to load the PDF fromtitle
- the title to give that PDF - may be nullfile
- 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