Solved

output text into .PDF

Posted on 2001-07-04
6
189 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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 34
Java: anonymous class 4 29
printf performancy 11 69
swing controls 2 16
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

856 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