Are you running this in an application server of some kind? If yes, in
which?

If this happens, it means that there's something weird with the class
loader setup because the Service class in xmlgraphics-commons.jar cannot
find the text files in fop.jar under the META-INF/services directory.
Please make sure that fop.jar and xmlgraphics-commmons.jar are in the
same place if you've deployed this in an application server, so that
both JARs end up in the same class loader.

If the above doesn't help please tell us a little more about the
environment you're running FOP in: directory structure, app server name
and version etc.

On 10.05.2006 10:13:36 De Vleeschauwer Nele wrote:
> Hi
> 
> For the moment I'm trying out the fop-0.92 beta release.
> 
> When I try to convert XML to PDF, I always receive the following
> message:
> 
> "Don't know how to handle "application/pdf" as an output format. Neither
> an FOEventHandler nor a Renderer could be found for this output format"
> 
> I use the following code:
> 
>       OutputStream out = new java.io.FileOutputStream(pdfFile);
>       out = new java.io.BufferedOutputStream(out);
> 
>       FopFactory fopFactory = FopFactory.newInstance();
>       FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
>       Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent,
> out);
>           
>       Source xsl = createSourceObject(xslStylesheet);
>       
>       TransformerFactory factory = TransformerFactory.newInstance();
>       Transformer transformer = factory.newTransformer(xsl);
>         
>       Source src = createSourceObject(xmlInstance);
>         
>       Result res = new SAXResult(fop.getDefaultHandler());
> 
>       transformer.transform(src, res);
>       
> 
> 
> What am I doing wrong here ?



Jeremias Maerki


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

Reply via email to