public class ResourceHandler extends Object implements org.apache.xmlgraphics.ps.dsc.DSCParserConstants, PSSupportedFlavors
COMMENT, DSC_COMMENT, EOF, HEADER_COMMENT, LINELEVEL_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,
Map formResources)
Main constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
process(InputStream in,
OutputStream out,
int pageCount,
Rectangle2D documentBoundingBox,
PSRenderingUtil psUtil)
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, 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(InputStream in, OutputStream out, int pageCount, Rectangle2D documentBoundingBox, PSRenderingUtil psUtil) throws org.apache.xmlgraphics.ps.dsc.DSCException, 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)")psUtil - org.apache.xmlgraphics.ps.dsc.DSCException - If there's an error in the DSC structure of the PS fileIOException - In case of an I/O errorCopyright © 2023 Apache Software Foundation. All rights reserved.