public class ResourceHandler extends java.lang.Object implements org.apache.xmlgraphics.ps.dsc.DSCParserConstants, PSSupportedFlavors
COMMENT, DSC_COMMENT, EOF, HEADER_COMMENT, LINE
LEVEL_2_FLAVORS_FORM, LEVEL_2_FLAVORS_INLINE, LEVEL_3_FLAVORS_FORM, LEVEL_3_FLAVORS_INLINE
Constructor and Description |
---|
ResourceHandler(FOUserAgent userAgent,
PSEventProducer eventProducer,
FontInfo fontInfo,
org.apache.xmlgraphics.ps.dsc.ResourceTracker resTracker,
java.util.Map formResources)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
process(java.io.InputStream in,
java.io.OutputStream out,
int pageCount,
java.awt.geom.Rectangle2D documentBoundingBox)
Rewrites the temporary PostScript file generated by PSRenderer adding all needed resources
(fonts and images).
|
public ResourceHandler(FOUserAgent userAgent, PSEventProducer eventProducer, FontInfo fontInfo, org.apache.xmlgraphics.ps.dsc.ResourceTracker resTracker, java.util.Map formResources)
userAgent
- the FO user agenteventProducer
- the event producerfontInfo
- the font informationresTracker
- the resource tracker to useformResources
- Contains all forms used by this document (maintained by PSRenderer)public void process(java.io.InputStream in, java.io.OutputStream out, int pageCount, java.awt.geom.Rectangle2D documentBoundingBox) throws org.apache.xmlgraphics.ps.dsc.DSCException, java.io.IOException
in
- the InputStream for the temporary PostScript fileout
- the OutputStream to write the finished file topageCount
- the number of pages (given here because PSRenderer writes an "(atend)")documentBoundingBox
- the document's bounding box
(given here because PSRenderer writes an "(atend)")org.apache.xmlgraphics.ps.dsc.DSCException
- If there's an error in the DSC structure of the PS filejava.io.IOException
- In case of an I/O errorCopyright 1999-2012 The Apache Software Foundation. All Rights Reserved.