aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to open a pdf file from Swing Panel? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to open a pdf file from Swing Panel?" Watch "How to open a pdf file from Swing Panel?" New topic
Author

How to open a pdf file from Swing Panel?

kapil Gupta
Greenhorn

Joined: Jan 31, 2002
Posts: 9
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

Joined: Sep 28, 2000
Posts: 508
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
 
subject: How to open a pdf file from Swing Panel?