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

Export to pdf

 
karthik tvn
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i have doubt on export to pdf. I have given my code. In that code, i have drawn a circle in jPanel2. I need to export this circle to pdf i.e., export the jPanel2 content to pdf.(In pdf i can print the circle if needs)...

please give any solution or refer any link...
please help me....
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using IText you can generate PDF documents through Java.
You might have to convert your "circle" to an image first before inserting it into the PDF.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The iText library can export Swing components to PDF. Chapter 12 of the excellent iText in Action book explains this. If you're at all serious about creating PDFs you need this book.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Search for Open Source java PDF libraries in Google, you'll find plenty of libraries for this task . iText is one and here is a link to several more.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic