public class ImageImporter extends Importer
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.
Importer.ImporterTask
Constructor and Description |
---|
ImageImporter() |
Modifier and Type | Method and Description |
---|---|
boolean |
canLoad(String mimeType)
Returns true if this importer can load a file or stream of the
specified MIME Content-Type.
|
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. |
protected boolean |
isPDFImporter()
Indicates whether this importer loads from a PDF document.
|
boolean |
matches(File file)
Return true if this Importer can load the specified file.
|
getImporter, getParser, initialize, isAddToMostRecent, processPDF, setAddToMostRecent
getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getFeatureURLProperty, getName, isEnabledByDefault, setFeatureName, teardown, toString
protected boolean isPDFImporter()
Importer
isPDFImporter
in class Importer
public FileFilter getFileFilter()
Importer
FileFilter
that can be used to choose files
acceptable to this Importer.getFileFilter
in class Importer
public boolean matches(File file) throws IOException
Importer
matches
in class Importer
file
- the File to be checked.IOException
public boolean canLoad(String mimeType)
Importer
public Importer.ImporterTask getImporter(PDFViewer viewer, File file)
Importer
Importer.ImporterTask
that will load a PDF into the viewer from the specifed File.getImporter
in class Importer
viewer
- the PDFViewerfile
- the FILE to load the PDF fromImporter.ImporterTask
to load the PDFpublic Importer.ImporterTask getImporter(PDFViewer viewer, InputStream in, String title, File file)
Importer
Importer.ImporterTask
that will load a PDF into the viewer from the specifed InputStream.getImporter
in class Importer
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.Importer.ImporterTask
to load the PDFCopyright © 2001-2017 Big Faceless Organization