TXT to PDF conversion
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   subbiah_raman
Posted On:   Tuesday, May 20, 2003 04:16 PM

hi, We are running an application server and on of our applications generate a txt file and we need to convert it into a pdf file. Right now we are doing the conversion in batches using adobe but we need to do it on a transactional basis. So I need to write a program to basically read a text file and convert it into pdf file. I know a liitle bit of java and I need a few tips to start on this project. I am sure I can do it if I get a few good tips as to how to begin or where to look for

Re: TXT to PDF conversion

Posted By:   Christopher_Koenigsberg  
Posted On:   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.

About | Sitemap | Contact