Wednesday, May 21, 2003 06:47 AM
We are going to have to start doing that soon too, inside some servlets.
Currently we generate all the PDF files in advance, in nightly Solaris shellscripts and Perl scripts (some scripts write other scripts, and then run them). They pipe the text files through the "nenscript" C program (open source version of the old Adobe "enscript" program), and the "ps2pdf" script, which in turn uses Ghostscript underneath.
So one quick and dirty way to do it from a servlet would be to just Runtime exec the "nenscript" and "ps2pdf".
But we will do the usual search (jguru FAQ's, apache.org, sourceforge.net, Google) for open source Java API's to generate PDF, including maybe some XSL-FO if that is manageable, since that might be the most elegant solution.