File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to open a pdf file from Swing Panel?

 
kapil Gupta
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How can I open a pdf file on the click of a button in a Swing Panel. Is it possible to open a pdf file inside a Swing Panel?
Thanks,
Kapil
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
the JEditorPane is supposed to display formatted text. you will need some EditorKit that describes the pdf-format. As this is an open format you can either write the EditorKit yourself (see the HTMLEditorKit (javadoc and source)) or search the web for existing implementations. there should be as it should be rather common to display pdf in a java component?!
cheers,
Chantal
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic