Re: fop without temporary file

I suspect what you're looking for is the ability to pipe the XML into
"stdin" of the FOP process. And you'd probably want to be able to send
the PDF to "stdout" afterwards. Unfortunately, this hasn't been
implemented, yet.

You've got about three options:
1. Write a minimal Java class that embeds FOP and does exactly what I
describe above. Shouldn't be hard with information on the FOP website if
you have some Java knowledge.
2. Long-term solution: Add "piping" support to the command-line
interface of FOP and submit a patch.
3. If you want to call FOP many times, for example as part of a server
process, then you'd better deploy FOP as a servlet or web service so you
don't always have the JVM startup overhead each time you create a PDF:
4. You can also experiment attaching FOP to your application using JNI 
(Java Native Interface), but that's a rather hardcore approach.

I hope that gives you some ideas.

On 19.04.2008 14:04:52 Alex Smorodin wrote:
> first of all, sorry for my english.
> how can i use fop to generate pdf, without creating a temporary XML file.
> 
> now I have a xsl file, and then create a temporary xml file,  and  execute
> "fop -xsl file.xsl -xml file.xml  -pdf file.pdf". but i must to  delete
> file.xml leter.
> 
> how can I  generate pdf without creating temporary xml file?  how to explain
> to FOP get xml data from string?
> p.s.   i am using C++.  exec FOP  from execv();



Jeremias Märki
_________________________________________________________
Jeremias Märki, Software-Development and Consulting
Contact Information: http://www.jeremias-maerki.ch/contact.html
Blog: http://www.jeremias-maerki.ch/blog/

Received on Monday, 21 April 2008 08:46:39 UTC