• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to open a pdf file from Swing Panel?

 
kapil Gupta
Greenhorn
Posts: 9
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic