output text into .PDF

Posted on 2001-07-04
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");

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??

Question by:TLTEO
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

mattyk earned 30 total points
ID: 6253453
Here's a great article on this topic,,12082_626501,00.html

it works with the API available at

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


Expert Comment

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...
LVL 18

Expert Comment

ID: 6256123
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.


Author Comment

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


Expert Comment

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


Author Comment

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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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
ejb wildfly example 2 111
jsp insert to database example 2 90
ejb mdb examples 1 39
Finding all private fields and their corresponding getters setters for nested classes 4 31
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

739 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