Generating pdf from xml

Here should go questions about transforming XML with XSLT and FOP.
ms.arora
Posts: 1
Joined: Mon Dec 31, 2007 1:00 pm

Generating pdf from xml

Post 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.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post 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
Post Reply