Hi Jim,
I have exactly the same problem, and I've just found a non
elegant, working solution:
I generate my XML file, and then call the command line Fop from within my
servlet:
Runtime.getRuntime().exec(new String[]{"java.exe", "-cp",
"c:\\fop\\Fop-0.18.1-DEV\\fop.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\w3c.jar;c:\\
fop\\Fop-0.18.1-DEV\\lib\\xalan-2.0.0.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\xerc
es-1.2.3.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\jimi-1.0.jar",
"org.apache.fop.apps.Fop", "-xml" , "c:\\prueba.xml", "-xsl" ,
"c:\\prueba.xsl", "-pdf" , "c:\\prueba.pdf"});
As I said, it is NOT elegant, but after sweating for days with problems of
all type doing the elegant thing, I get my beautiful PDF on disk.
Of course you should adapt the names of trhe directories and the xml and
xsl files.
Cheers,
Gustavo
PS: if someone has an elegant solution I would be happy to use it too.
> -----Message d'origine-----
> De : Jim Urban [mailto:[EMAIL PROTECTED]]
> Envoyé : vendredi, 6. juillet 2001 17:09
> À : [EMAIL PROTECTED]
> Objet : Need Working Sample
>
> Hi, I am new to FOP. I have a servlet which dynamically generates XML. I
> need to apply an XSL stylesheet containing FO tags to generate a FO
> version of the XML and then I need to run this FO version of the XML
> through FOP (or Driver) so the servlet can return a dynamically created
> PDF to the browser. Does anyone have a working example of how to do this?
> Only the XSL style sheet containing the FO tags used in the initial
> transform will be on disk. Please help, I have to get this working.
>
> Thanks,
>
> Jim Urban
> Product Manager
> Netsteps Inc.
> Suite 505E
> 1 Pierce Pl.
> Itasca, IL 60143
> Voice: (630) 250-3045 x2164
> Fax: (630) 250-3046
>
> << Fichier: ATT14204.txt>>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]