Solved

output text into .PDF

Posted on 2001-07-04
6
190 Views
Last Modified: 2010-04-16
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??


0
Comment
Question by:TLTEO
6 Comments
 
LVL 5

Accepted Solution

by:
mattyk earned 30 total points
ID: 6253453
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
 
LVL 3

Expert Comment

by:jerelw
ID: 6255807
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
 
LVL 18

Expert Comment

by:bobbit31
ID: 6256123
listening...
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:TLTEO
ID: 6256558
OK what is the url to XML to pdf on the IBM site.

0
 
LVL 3

Expert Comment

by:jerelw
ID: 6257995
You have to register, but it's free.

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

0
 

Author Comment

by:TLTEO
ID: 6272035
Tks.  Thats  what I want.  A simpel way to output the text. Cheers
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
arguments to jar 5 39
Configure a Bean in an XML file 4 48
Fast way to search item into Java Array (Rhino compatible) 2 36
batch vs regular insert in spring DAO 2 20
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This video teaches viewers about errors in exception handling.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question