output text into .PDF

Hi  there

I know that we can use codes like

PrintWriter out = new PrintWriter(new FileWriter("C:\\Program Files\\myfiles\\outputfile.txt");
out.println(buf.toString());

this si to write some text into a file


If I want to write the output into a pdf file,  any chnace how to so it??


TLTEOAsked:
Who is Participating?
 
mattykConnect With a Mentor Commented:
Here's a great article on this topic
http://softwaredev.earthweb.com/java/article/0,,12082_626501,00.html

it works with the API available at
http://www.etymon.com/pj/index.html


There are several API's availalbe out there to do this too

http://sourceforge.net/projects/reteppdf/
http://www.lowagie.com/iText/
http://sourceforge.net/projects/gnujpdf/

-matty
0
 
jerelwCommented:
Why not have your code output XML and then stream out the desired format by applying a stylesheet?

Should you decide to output to a different format like csv, html, svg, etc, the foundation is already set.

There is a free XSL course that demonstrates XML to pdf on the IBM site.

It might be worth the time to spend the effort in making your code able to output to any format with minimal code changes.

It looks like your going to spend time learning the pdf API's anyway...
0
 
bobbit31Commented:
listening...
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
TLTEOAuthor Commented:
OK what is the url to XML to pdf on the IBM site.

0
 
jerelwCommented:
You have to register, but it's free.

http://www6.software.ibm.com/reg/xml/transformxml-i

0
 
TLTEOAuthor Commented:
Tks.  Thats  what I want.  A simpel way to output the text. Cheers
0
All Courses

From novice to tech pro — start learning today.