You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Pa...@chase.com on 2002/10/08 16:10:38 UTC
Setting the user configuration in embedded code
Hi, wonder if anyone can help.
I am trying to set the user configuratuion file with FOP embedded in my
app.
java.io.BufferedOutputStream bufferedOutputStream = null;
org.apache.fop.apps.Driver driver = null;
java.io.ByteArrayInputStream byteArrayInputStream = null;
// file to write output to
bufferedOutputStream = new java.io.BufferedOutputStream (
outputStream );
// create FOP object with arguments, and run it
byteArrayInputStream = new java.io.ByteArrayInputStream
( this.writeXML ( document, true ).getBytes ( ) );
driver = new org.apache.fop.apps.Driver ( new
org.xml.sax.InputSource ( byteArrayInputStream ), bufferedOutputStream );
// render pdf to file
driver.setRenderer ( driver.RENDER_PDF );
driver.run ( );
// close file
bufferedOutputStream.close ( );
I would like to specify some options for loading custom fonts.
Has anyone done this or know how to load a user config file in code. ANy
help would be appreciated.
Regards
Paul.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org