The DocFlavor class has an inner class for each of the common representation class names. Each inner class contains a set of DocFlavor object constants representing formats that can be delivered using the representation class. For example, an input stream can stream many different kinds of print data formats, including GIF, represented by DocFlavor.INPUT_STREAM.GIF, and PostScript™, represented by DocFlavor.INPUT_STREAM.POSTSCRIPT. If one of the DocFlavor object constants accurately describes the format of a given piece of print data, the client can use this constant instead of constructing a DocFlavor.
If the appropriate DocFlavor is not already defined in the JPS API, a client can create it with the DocFlavor constructor. The client can use the MIME types and representation class names explained in the next two sections to construct the DocFlavor.
MIME type | Format of data |
---|---|
"application/pdf" |
Portable Document Format document |
"application/postscript" |
PostScript™ document |
"application/vnd.hp-PCL" |
Printer Control Language document |
MIME type | Format of data |
---|---|
"image/gif" |
Graphics Interchange Format image |
"image/jpeg" |
Joint Photographic Experts Group image |
"image/png" |
Portable Network Graphics image |