Page 1 of 1

Generating pdf from xml

Posted: Mon Dec 31, 2007 1:08 pm
by ms.arora
Dear All,

I'm able to successfully generate a PDF from XML by setting up Transformation Scenario. It also allows me to configure XSLT & FO processors, specify custom fonts and extensions. I'm now working on stand alone Java program to replicate similar transformations by invoking Java XML API's but the program throws a runtime error saying:

ERROR: 'org/apache/avalon/framework/configuration/Configuration'
FATAL ERROR: 'Could not compile stylesheet'
EXCEPTION:
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet

I have been going through sample programs bundled with Xalan and FOP jars but not able to resolve this issue. Can someone please guide me how to do transformations uing Java?

Thanks.

Posted: Fri Jan 04, 2008 6:32 pm
by sorin_ristache
Hello,

It seems you did not include the FOP dependency libraries in the classpath of your Java program, for example avalon-framework-4.2.0.jar (for FOP version 0.94). You have to include the jars from the folder [FOP-install-folder]/lib in the classpath of your program.


Regards,
Sorin