Hi Emmanuel,
Here is example code that works for me (it should work for you also :-)
Options options = null;
String pathFonts = null;
options = new Options(new File("userconfig.xml"));
Driver driver = new Driver();
driver.setRenderer(Driver.RENDER_PDF);
driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");
driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");
driver.setOutputStream(out);
driver.buildFOTree(createParser(), foFile);
driver.format();
driver.render();
I hope this helps you.
Denis Kranjcec
-----Original Message-----
From: Emmanuel Dupouy [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 6:32 PM
To: [EMAIL PROTECTED]
Subject: Embeded Fop
Hi,
I'm using fop to generate pdf files and it works well.
But in my xsl:fo document produced I use fonts that are not contained by
default. So I produced an xml which contains the font metrics as fop manual
says. After I made an xml configuration file to complete the font
declaration of Fop.
If I use Fop from command line I can had this new configuration file with
this option :
-c resources/FOPConfig.xml
How can I do this when I Instantiate an org.apache.fop.apps.Driver.
Do I have to de-jar Fop and add the font declaration directly in config.xml
of Fop?
Or can I pass to the additional information to Fop via my java program. I
rather prefer this last solution which much more elegant.
Thanks for any help.
Emmanuel
Emmanuel DUPOUY
[EMAIL PROTECTED]
Valtech http://www.valtech.com/
Phone (33)1 41.88.23.00 Fax (33)1 41.88.23.01
=========================================================================
Ce message et toutes les pi�ces jointes sont propri�t� de VALTECH et
susceptibles de contenir des informations confidentielles � l'intention
exclusive de ses destinataires. Si vous avez re�u ce message par erreur
ou si celui ci vous est parvenu incomplet ou alt�r�, merci d'en avertir
l'exp�diteur par retour.Toute utilisation, diffusion ou publication non
express�ment autoris�e par nous par �crit est strictement interdite.
--------------------------------------------------------------------------
This message and any attachments are Valtech property and may contain
iconfidential information intended solely for the addressees. If your are
not the intended recipient of this message or if you have received it
uncomplete or altered, please notify the author by replying to his e-mail
immediately. Any unauthorised use, diffusion or dissemination not
expressly authorised by us in writing is strictly prohibited.
=========================================================================
Copyright Valtech 2000
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]