You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Semprini Davide <da...@cineca.it> on 2001/09/14 15:41:28 UTC
help please Problem with generation PDF
Hi,
I have witten a Servlet that take two file in input (file.xml and file.xsl)
my code is:
Driver driver = new Driver();
driver.setRenderer(Driver.RENDER_PDF);
File xmlFile = new File("c:\\xml_to_pdf.xml");
File xslFile = new File("c:\\TransformPDF.xsl");
InputHandler inputHandler = new
XSLTInputHandler(xmlFile,xslFile);
XMLReader parser=createParser();
driver.setOutputStream(new FileOutputStream("outFile.pdf"));
driver.render(parser, inputHandler.getInputSource());
and my servlet have a block inside Method render( )
The parser is instantiated correctly I think that there is a problem
in the way that i pass the Files!! TOMCAT REPLY ME:
building formatting object tree
setting up fonts
WARNING: Unknown formatting object ^val
____________ and then an error inside driven.render()
my xml is very simple like this:
<?xml version="1.0" encoding="UTF-8"?>
<val>
<title>Prova di PDF</title>
<source>Sorgente</source>
<date>13-09-01</date>
<paragraph number="1">
<line>Questa e' una prova di creazione di PDF utilizzando i tag
XSL-FO</line>
</paragraph>
</val>
WHY the transform don't know my root element!!!!!!!!!!!!!!!!!!!!!!!!!
Please can somebody help me??????
Tanks a lot!!!!
D.Semprini
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org