Qoppa Software - PDF Tools & Libraries

jPDFViewer™ Applet Samples
Applets samples to view PDF documents
When deploying jPDFViewer - our java PDF viewing component - as an applet to display PDF documents in a web browser, it can be done in a number of ways:
Simple Applet - This is the simplest way to launch jPDFViewer, the page contains jPDFViewer in an applet and loads a document when the applet is launched.
Applet with Hidden Buttons - The buttons on the toolbar of the viewer can be configured from the HTML that launches it. In this example, the viewer is displayed without the open and print buttons.
Applet with Javascript Integration - jPDFViewer can interact with Javascript to drive some of its interface. In this sample, we use Javascript to hide and display buttons, load other documents and set the page.
Applet with Custom Opener - jPDFViewer can be set to use a custom "opener", an external interface that jPDFViewer calls when the user presses the open button. This mechanism can be used to open PDF documents from somewhere other than the local file system, such as from a web server or a database.
In this sample, jPDFViewer gets a list of files from a web server, shows these to the user and then opens the file directly from the web server when one is chosen. To see the results, press the open button on the toolbar.
Applet with CMYK Profiles - This applet includes the Adobe® CMYK profile to convert CMYK colors to RGB in the exact same way that Adobe® does.
Applet Deployment
To deploy the web viewer on your website, you will need the HTML page that launches the viewer applet as well as the following two jar files.
jPDFViewerS.jar - The main jPDFViewer jar file, contains the PDF viewing component.
webviewer.jar - The Java applet that contains the jPDFViewer component. This jar file contains the source code to the applet so that you can modify to meet your needs.
Applet Parameters
When launching an applet, the HTML code can pass parameters to the applet to set any options that the applet supports. The applet then takes this parameters and can implement the options. In the applet used in these samples, we have defined the following parameters:
OpenURL - This parameter can be set to the URL of a PDF document to load when the applet is launched.
OpenVisible - This parameter tells the applet whether to display the open button on the toolbar. Valid values are "true", "false", "1" and "0".
PrintVisible - This parameter tells the applet whether to display the print button on the toolbar. Valid values are "true", "false", "1" and "0".
ToolbarVisible - This parameter tells the applet whether to display the toolbar on the viewer. Valid values are "true", "false", "1" and "0".
Scale - This parameters tells the applet to set the initial scale. This is a percentage value with 100 being normal size.
DocumentList - This parameter tells the applet to use a custom opener that will get its list of files from an XML file from the given URL. The XML file will contain a list of PDF files that should be shown to the user and can include subfolders. You can look at a sample list here.
DocumentList_Text - This parameter tells the applet to use a custom opener that will get its list of files from a text list from the given URL. The text list should be composed of two values for each line, separated by the tab character. The first value should be the name of the document, used to display to the user. The second value should be the URL to the PDF document, used when loading the document. You can look at a sample list here.
Please keep in mind that we have defined these parameters to illustrate the capabilities when deploying jPDFViewer in an applet. We provide the source code to this applet, so additional parameters and / or features can be added according to your needs.
We can also consult with you to implement additional features and parameters.