Skip to main content

Posts

Showing posts from October, 2012

How to open a PDF file using ICEpdf Viewer from your Java Application?

Few weeks back I designed an application, where I wanted to display Help content through a PDF file rather than through a textbox in a JPanel, because the help content had complex formula stuffs. So I thought of embedding the PDF file with my swing application itself. But it was too tricky to learn in a short span of time. So I figured out two options to display the help content. By opening the PDF file using a native PDF Reader in the system, on click of the Help Button in my Java Swing application. By opening the PDF file using a PDF reader integrated with my application jar package, on click of the Help Button in my Java Swing application. I dont want to discourage the readers, but to be frank the above two methods didnt work for one bad reason. You need the absolute path of the PDF file to be used in the source code. One solution would be to load a PDF file from a Web link. Another solution would be to use an installation wizard (See here ) for your Java application to plac