Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to convert TEXT/HTML file format to PDF format

 
himanshu patel
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Is there any JAVA API to convert simple text/html files to PDF files?
As we do in JAVA to write text file, similarly is it possible through Java to open PDF file
and write to it.
I mean something like, open PDF file first and then write strings to it as we do for TEXT file.
Can someone help in this regard?
Any suggestion would be highly appreciated.
Himanshu
 
Steve Carton
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't tried it out yet, but look at
http://www.etymon.com/pjc/
Originally posted by himanshu patel:
Hi all,
Is there any JAVA API to convert simple text/html files to PDF files?
As we do in JAVA to write text file, similarly is it possible through Java to open PDF file
and write to it.
I mean something like, open PDF file first and then write strings to it as we do for TEXT file.
Can someone help in this regard?
Any suggestion would be highly appreciated.
Himanshu
 
Jaunty John
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to go to http://sourceforge.net/ and search for "JasperReports". Or just try "PDF Documents". These are open source, i.e. FREE.
JohnB
 
himanshu patel
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to all for your valuable suggestions.
I have got what I want. I have used iText PDF library for java. It is very easy and extremely
useful.
For more info look at, http://www.lowagie.com/iText/links.html
Thanks again.
Himanshu
 
Robert Willems
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also try FOP from the Apache project
Regards,
Robert
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic