The user config options are static, so you can call this anywhere before you start you create your driver.  You only have to call this once.

import org.apache.fop.apps.Options;

// Declare our FOP User Config file (this is where we get our fonts)
File userConfigFile = new File( "userconfig.xml" );
org.apache.fop.apps.Options options = new org.apache.fop.apps.Options( "userconfig.xml" );


10/08/02 09:10 AM
Please respond to fop-dev

        To:        [EMAIL PROTECTED]
        Subject:        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
 bufferedOutputStream = null;
        org.apache.fop.apps.Driver   driver               = null; byteArrayInputStream = null;

        // file to write output to
        bufferedOutputStream = new (
outputStream );

        // create FOP object with arguments, and run it
        byteArrayInputStream = new
           ( 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 ); ( );

        // 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.



To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to