File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Export to pdf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Export to pdf" Watch "Export to pdf" New topic
Author

Export to pdf

karthik tvn
Greenhorn

Joined: Feb 15, 2008
Posts: 13
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

Joined: Jul 26, 2007
Posts: 9990
    
    7

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.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39529
    
  27
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.


Ping & DNS - updated with new look and Ping home screen widget
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

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.


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Export to pdf
 
Similar Threads
Help with two buttons on applet
trouble with layouts
JTabbedPane
linking between applet pages
NetBeans manually added component does not appear