• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create a pdf of Swing compnents?

 
siva prasa
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have to create my swing components with appropriate values as PDF page ,when i click SAVE buttin in my swing page it has to create PDF file with components.I have attached my page as image .If any one knows please help how to solve this problem.Thank you for reading this forum.

SamplePagesNew.GIF
[Thumbnail for SamplePagesNew.GIF]
My Sample Page
 
rogel garcia
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could make a Print Screen of your application..

Then you could create a PDF and embed the image into it..

To create a PDF you can use iText....


I'm not expert in Swing but with the Graphics object of the view I think you can save an image of it...
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "PDF file with components" - what are those "components"? AcroForms? Or something else?
 
siva prasa
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.How to create a PDF file from a java code using swing.Any example or website please help me.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are any number of iText tutorials and introductions out there on the web (not to mention the iText web site); a quick search will find them.

There's no difference between using iText in a Swing app and using it in some other environment.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!