xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "De Vleeschauwer Nele" <Nele.DeVleeschau...@nbb.be>
Subject Can not handle application/pdf format
Date Wed, 10 May 2006 08:13:36 GMT

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

"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,
    	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 ?

Kind regards,

Nele De Vleeschauwer.

Visit our website! http://www.nbb.be

"DISCLAIMER: The content of this e-mail message should not be
construed as binding on the part of the National Bank of Belgium
(NBB) unless otherwise and previously stated. The opinions
expressed in this message are solely those of the author and do not
necessarily reflect NBB viewpoints, particularly when the content
of this message, or part thereof, is private by nature or does not
fall within the professional scope of its author."

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message