TOC PREV NEXT INDEX




ICEpdf Viewer Application


The ICEpdf Viewer is a reference implementation (RI) of a standalone PDF viewer application. You can use it as is, or as a starting point for your own custom application.

The application uses the SwingViewBuilder object to create the GUI elements in the viewer application, such as the toolbar and menu system. These GUI elements, including the page view, are controlled by the SwingController object which produces a rich viewer application that can be used as is in most implementations.

The source code for the ICEpdf Viewer Application is located in the src\com\icesoft\pdf\ri\viewer directory.

Starting the ICEpdf Viewer Application
  1. Ensure that JDK 1.3.1 or higher has been installed.
  2. Add the relevant JAR files to the classpath. You need at least the following:
ri_pdf.jar
icepdf.jar

To enable exporting to SVG, you also require the following Batik JAR files:
batik-awt-util.jar
batik-dom.jar
batik-svggen.jar
batik-util.jar
batik-xml.jar

For more information, see "Batik Library for SVG Support" .
To enable viewing of documents that are encrypted with Acrobat standard security, you also require the following Bouncy Castle JAR file (or the JAR for another appropriate JCE 1.2.1 security provider implementation):
bcprov-jdk{version}.jar (where version is the appropriate version of the JAR)
For more information, see "Acrobat Standard Security Support" .
  1. Run java com.icesoft.pdf.ri.viewer.Main [option <value>]
Starting as an Executable JAR

The ri_pdf.jar file is an executable JAR file, so you can also start the Viewer Application with JDK 1.3.1 or greater as follows:

java -jar ri_pdf.jar
 
Command Line Options
Option
Description
-loadfile filename
Starts the ICEpdf Viewer and displays the specified local PDF file. Use the following syntax:
-loadfile c:/examplepath/file.pdf
 
-loadurl url
Starts the ICEpdf Viewer and displays the PDF file at the specified URL. Use the following syntax:
-loadurl http://www.examplesite.com/file.pdf
 

To start the ICEpdf Viewer without command line options or Batik support:

java -classpath ri_pdf.jar;icepdf.jar com.icesoft.pdf.ri.viewer.Main
 

To start the ICEpdf Viewer and load a PDF from a website:

java -classpath ri_pdf.jar;icepdf.jar com.icesoft.pdf.ri.viewer.Main 
 
	-loadurl http://www.icesoft.com/products/ICEpdf.pdf
 
Settings Directory

The ICEpdf Viewer stores its settings in the directory:

<user_dir>/ICEsoft/ICEpdf Viewer/

where <user_dir> is the platform-specific directory specified by the user.home system property.

Using the ICEpdf Viewer

This section describes how to use the ICEpdf Viewer application to do the following:

Opening PDF Files

You can open a PDF file from the local file system or from a URL.

To open a local PDF file
  1. Launch your ICEpdf application (if it is not already running).
  2. Click File > Open > File.
  3. In the Open dialog box, select a PDF file and click Open.
To open a PDF from a URL
  1. Launch ICEpdf.
  2. Select File > Open > URL.
  3. In the Open URL dialog box, type the URL of a PDF file in the form http://www.icesoft.com/products/ICEpdf.pdf and click OK.
To open a PDF using Drag and Drop

You can open a PDF file by dragging it from your file system onto the Viewer application window. You can also drag and drop multiple files at once.

Furthermore, some applications allow you to drag and drop URL text strings. If you drag a URL pointing to a PDF file onto the Viewer application, that file is opened. The text string must contain an http:// prefix and a .pdf reference.

Note: If a file is password protected and security support has been configured, a password dialog is displayed. You have three attempts to enter the correct password, after which an error message is displayed. If the file has other security settings, such as "No Printing", the ICEpdf Viewer respects those settings.
Opening Multiple PDF Files

The ICEpdf Viewer implements a Single Document Interface (SDI) for viewing PDF files. Multiple PDF files can be viewed at the same time, each in its own application window. Some MDI functionality has been included in the Window menu, which allows the user to switch between each open Viewer window, minimize all Viewer windows, and bring all Viewer windows to the front.

An additional ICEpdf Viewer window is opened automatically when you open another PDF file.

About the ICEpdf Viewer Work Area

The ICEpdf Viewer consists of the following four distinct work areas:

Figure 4-1 ICEpdf Viewer Work Area



About the ICEpdf Viewer Main Toolbar

The toolbar has shortcuts for many common functions, but you can hide it to have a larger display area.

To show or hide the toolbar, select View > Show Toolbar or View > Hide Toolbar.

The toolbar provides access to the view and navigation functionality.

Figure 4-2 ICEpdf Toolbar



About the ICEpdf Viewer View Toolbar

The view toolbar contains four buttons that allow you to change how a PDF document is displayed.

About the Utility/Bookmark Pane

You can show or hide the utility pane, which contains tabs for a document's bookmarks and for the search function. If the file does not have any bookmarks, the bookmarks tab is not displayed.

To show or hide the utility pane, select View > Show Utility Pane or View > Hide Utility Pane.

Alternatively, if the toolbar is displayed, you can click the Show/Hide Utility Pane button.

For information on using bookmarks, see "Using Bookmarks" .

Navigating a PDF File
Using Bookmarks

If a PDF file has been created with bookmarks, you can use the bookmarks like a table of contents to choose what you want to view.

Bookmarks are displayed on a tab in the utility pane on the left side of the Viewer. However, they are not displayed if View > Hide Utility Pane has been selected.

Viewing a Bookmark Topic

To view a bookmark topic, click the bookmark topic name.





Viewing More Bookmark Topics

If a bookmark has a + symbol beside it, you can expand a parent bookmark topics to reveal its children. Similarly, click the - symbol next to a bookmark to collapse a parent bookmark and hide its children.





Viewing the Next or Previous Page

Using the toolbar, select the Next Page or Previous Page buttons to navigate.

Viewing the First or Last Page

Using the toolbar, select the First Page or Last Page buttons to navigate.




Viewing a Specific Page

To view a specific page of a PDF file:

  1. Select Document > Go To Page.






  1. In the Go To Page dialog, select a page number and click OK.

Using the toolbar, type a page number in the page number field and press Enter.




Zooming In and Out

You can zoom in on a page to get a closer view, and you can zoom out for a smaller view.

Using the toolbar, select the Zoom In or Zoom Out buttons. You can select a magnification percentage from the Zoom drop-down selection box, or type a value in the Zoom box and press Enter.




Select the Zoom In Tool or Zoom Out Tool to simply click to zoom in or out on an area of the PDF file

.


Viewing a PDF File in its Original Size or to Fit the Window

Using the toolbar, click the Actual Size, Fit in Window, and Fit Width buttons.




Rotating a PDF File

If the PDF file is displayed sideways, you can rotate it so that it is easier to view or read.

To rotate the PDF file, select View > Rotate Left or View > Rotate Right. The view is rotated 90 degrees clockwise or counter-clockwise each time you select it.

Using the toolbar, click the Rotate Left and Rotate Right buttons.




Searching for Text

If a PDF file contains text, you can search for text strings within it using the Search function.

The Search function is displayed on a tab in the utility pane on the left side of the Viewer. However, it is not displayed if the Utility Pane is hidden. In this case, select Document > Search or click the Search Document button to open the Search tab.




To search for a text string, type it in the Search Text field and click Search. The results are displayed in the Results field, indicating how many hits were found on each page of the document. You can then click on an entry in the Result field to go directly to that page.

Keyboard and Mouse Manipulation

While viewing a PDF, you can use the following keyboard and mouse actions:

Keyboard or Mouse Action
Result
Page Up / Page Down
Scrolls the current page up/down. If the top/bottom of the page is reached, the view changes to the previous/next page in the document.
Arrow keys
Scrolls the display in the direction of the arrow key pressed. If the top/bottom of the page is reached, the view changes to the previous/next page in the document.
Mouse click
If the Zoom In tool is selected, zooms in. If the Zoom Out tool is selected, zooms out.
Mouse click and drag
If the Pan Tool is selected (the default), pans the display in the direction the mouse is dragged.
Mouse wheel
If you are using JDK 1.4 or higher, pages can be scrolled using the mouse scroll wheel. If the top/bottom of the page is reached, the view changes to the previous/next page in the document.

Displaying Document Permissions and Information

To display security information about an open PDF document, such as the security method and which security features are enabled, select File > Document Permissions.




To display other information about an open PDF document, such as the creator and modification dates, select File > Document Information.

Exporting a PDF File to SVG

SVG support is available if you have configured the optional Batik SVG library. For more information, see "Batik Library for SVG Support" .

To export a PDF file as an SVG file
  1. If Batik is configured, select File > Export SVG.
  2. In the Export as SVG dialog, specify a location and filename and click OK.
Exporting a PDF File to Text

You can export the text in a PDF to a text file.

To export a PDF file as a text file
  1. Select File > Export Text.
  2. In the Export Document Text dialog, specify a location and filename and click OK.
Printing a PDF File

To print a PDF file with a printer dialog, select File > Print.

Alternatively, from the toolbar, click the (Print button) to print a PDF file without displaying a print dialog.

To set the paper, orientation and margin settings before printing the file, select File > Print Setup.

Saving a Copy of a PDF File

To save a copy of the PDF file you are viewing

  1. Select File > Save a Copy.
  2. In the Save Copy dialog box, navigate to a location for the file, type a filename and click OK.
Closing a PDF File

To close the PDF file you are viewing, leaving the application open, select File > Close.

Exiting ICEpdf

To exit from the ICEpdf Viewer and close any open files, select File > Exit.




Copyright 2005-2007. ICEsoft Technologies, Inc.
http://www.icesoft.com

TOC PREV NEXT INDEX