org.apache.fop.render.ps
Class ResourceHandler
java.lang.Object
org.apache.fop.render.ps.ResourceHandler
- DSCParserConstants, PSSupportedFlavors
public class ResourceHandler
extends java.lang.Object
This class is used when two-pass production is used to generate the PostScript file (setting
"optimize-resources"). It uses the DSC parser from XML Graphics Commons to go over the
temporary file generated by the PSRenderer and adds all used fonts and images as resources
to the PostScript file.
static void | process(FOUserAgent userAgent, InputStream in, OutputStream out, FontInfo fontInfo, ResourceTracker resTracker, Map formResources, int pageCount, Rectangle2D documentBoundingBox) - Rewrites the temporary PostScript file generated by PSRenderer adding all needed resources
(fonts and images).
|
process
public static void process(FOUserAgent userAgent,
InputStream in,
OutputStream out,
FontInfo fontInfo,
ResourceTracker resTracker,
Map formResources,
int pageCount,
Rectangle2D documentBoundingBox)
throws DSCException,
IOException
Rewrites the temporary PostScript file generated by PSRenderer adding all needed resources
(fonts and images).
userAgent
- the FO user agentin
- the InputStream for the temporary PostScript fileout
- the OutputStream to write the finished file tofontInfo
- the font informationresTracker
- the resource tracker to useformResources
- Contains all forms used by this document (maintained by PSRenderer)pageCount
- the number of pages (given here because PSRenderer writes an "(atend)")documentBoundingBox
- the document's bounding box
(given here because PSRenderer writes an "(atend)")
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.