Viewer RI

compared with
Current by Patrick Corless
on Jan 27, 2010 13:13.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 5 changes. View first change.

 \\
  
 {anchor:top}
 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 {{*\[install_dir\]/icepdf/viewer/*}} directory.
{children:depth=3}
  
{anchor:startingviewer}
 h3. Starting the ICEpdf Viewer Application
  
 1. Ensure that JDK 1.5.0 or higher has been installed.
  
 2. Add the relevant JAR files to the classpath. You need at least the following:
  
 * {{{*}icepdf-core.jar{*}}}
 * {{{*}icepdf-viewer.jar{*}}}
  
 To enable ICEpdf Pro and full PDF font support, install the following:
  
 * {{{*}icepdf-pro.jar{*}}}
 * {{{*}icepdf-pro-intl.jar{*}}}
  
 To enable exporting to SVG, you also require the following Batik JAR files:
  
 * {{{*}batik-awt-util.jar{*}}}
 * {{{*}batik-dom.jar{*}}}
 * {{{*}batik-svg-dom.jar{*}}}
 * {{{*}batik-svggen.jar{*}}}
 * {{{*}batik-util.jar{*}}}
 * {{{*}batik-xml.jar{*}}}
  
 For more information, see {color:#004ca5}*[Batik Library for SVG Support]*{color}.
  
  
 3. Run "{{{*}java org.icepdf.core.ri.viewer.Main* [option <value>]}}"
  
  
 {anchor:startingexecutablejar}
 h5. 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.5.0 or greater as follows: "{{{*}java \-jar icepdf-viewer.jar{*}}}"
  
  
 {anchor:startingcommandline}
 h5. 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 icepdf-core.jar; icepdf-viewer.jar org.icepdf.core.ri.viewer.main{*}}}"
  
  
 {anchor:startingsettings}
 h5. 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.
 \\
 \\
  
 {anchor:usingviewer}
 h3. Using the ICEpdf Viewer
  
 This section describes how to use the ICEpdf Viewer application to do the following:
  
 * Open PDF files
 * Understand the ICEpdf Viewer work area
 * Navigate and manipulate the view of a PDF document
 * Export, save, and print the contents of a PDF document
 * Exit a document and the application
  
  
 {anchor:usingopendoc}
 h4. Opening PDF Files
  
 You can open a PDF file from the local file system or from a URL.
  
 h5. To open a local PDF file
  
 # Launch your ICEpdf application (if it is not already running).
 # Click *File* *>* *Open* *>* *File* (in the menu).
 # In the *Open* dialog box, select a PDF file and click *Open*.
  
 h5. To open a PDF from a URL
  
 # Launch ICEpdf.
 # Select *File* *>* *Open* *>* *URL* (in the menu).
 # In the *Open* *URL* dialog box, type the URL of a PDF file in the form
 {{*[http://www.icepdf.org/resources/DevelopersGuide.pdf]*}} and click *OK*.
  
 h5. 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:title=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.
 {note}
  
 h5. 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.
  
 {anchor:usingviewerworkarea}
 h4. The ICEpdf Viewer Work Area
  
 The ICEpdf Viewer consists of the following four distinct work areas:
  
 # *Main toolbar* \- provides controls and buttons to navigate and work with a PDF file.
 # *Document pane* \- displays a PDF file.
 # *Utility pane* \- has a bookmark tab which lets you browse a PDF file using a documents bookmarks and a search tab which enables you to search for text in a file.
 # *View toolbar* \- allows you to change the way a document's pages are displayed in the document pane.
  
 {color:#004ca5}{*}Figure 2 ICEpdf Viewer Work Area{*}{color}
  
 !viewer_sm.png!
  
 h5. 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.
  
 {color:#004ca5}{*}Figure 3 ICEpdf Toolbar{*}{color}
  
 !Picture 2.png|height=34 width=750!
  
 From left to right, the toolbar contains:
  
 {section}
  
 {column}
 * Open Document
 * Save As...
 * Print Document
 * Search Document
 * Show/Hide Utility Pane
 {column}
 {column}
 * First Page
 * Previous Page
 * Next Page
 * Last Page
 {column}
 {column}
 * Zoom Out
 * Zoom In
 {column}
 {column}
 * Actual Size
 * Fit in Window
 * Fit Width
 {column}
 {column}
 * Rotate Left
 * Rotate Right
 {column}
 {column}
 * Pan Tool
 * Text Selection Tool
 * Zoom In Tool
 * Zoom Out Tool
 {column}
 {column}
 * Annotation Select Tool
 * Link Annotation Tool
 {column}
 {section}
  
 h5. View Toolbar
  
 The view toolbar contains four buttons that allow you to change how a PDF document is displayed.
  
 !worddav8ae28e965f8e379cb372e55c6c3733dc.png|height=24,width=100!
  
 From left to right:
 * Facing Page View Continuous
 * Facing Page View Non-continuous
 * Single Page View Continuous
 * Single Page View Non-continuous
  
 h5. 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.
  
  
 {anchor:usingnavigation}
 h4. Navigating Within a PDF File
  
 h5. 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.
  
 h5. Viewing a Bookmark Topic
  
 To view a bookmark topic, click the bookmark topic name:
 !bookmarks.png|width=584,height=312!
  
 h5. 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.
  
 !worddav0c4c43468aaa22781a42bfccb22486b4.png|height=356,width=350!
  
 h5. Viewing the Next or Previous Page
  
 * To view the next page of a PDF file, select *Document* *>* *Next* *Page*.
 * To view the previous page of a PDF file, select *Document* *>* *Previous* *Page*. Using the toolbar, select the Next Page or Previous Page buttons to navigate.
 !worddavcfb69cef3ea5d7ec38bc6c531af5b130.png|height=34,width=169!
  
 h5. Viewing the First or Last Page
  
 * To view the first page of a PDF file, select *Document* *>* *First* *Page*.
 * To view the previous page of a PDF file, select *Document* *>* *Last* *Page*. Using the toolbar, select the First Page or Last Page buttons to navigate.
 !worddavcfb69cef3ea5d7ec38bc6c531af5b130.png|height=34,width=169!
  
 h5. Viewing a Specific Page
  
 To view a specific page of a PDF file:
  
 1. Select *Document* *>* *Go* *To* *Page*.
 !worddavc3d70b33f6e1dd32ed6ddb87880fed65.png|height=275,width=268!
 2. 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*.
  
 !worddavcfb69cef3ea5d7ec38bc6c531af5b130.png|height=34,width=169!
  
 {anchor:usingdocumentmanipulation}
 h4. Document Manipulation
  
 h5. 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:
 * To zoom in on a page, select *View* *>* *Zoom* *In*. You can zoom in repeatedly to get a closer view.
 * To zoom out from a page, select *View* *>* *Zoom* *Out*. You can zoom out repeatedly to get 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*.
  
 !worddav4d0e8048d7f54ca13068255b59aeb86e.png|height=37,width=136!
  
 Select the Zoom In Tool or Zoom Out Tool to simply click to zoom in or out on an area of the PDF file
  
 !worddav6e4341da2afc8f7cfc949f52c6d80370.png|height=32,width=49!
  
  
 h5. Viewing a PDF File in its Original Size or to Fit the Window
  
 * To view the PDF file in its actual size, select *View* *>* *Actual* *Size*. The actual size is the size of the page as it was originally created.
 * To view the PDF file so that the entire page is visible, select *View* *>* *Fit* *in* *Window*.
 * To view the PDF file so that the width of the page fills the window size, select *View* *>* *Fit* *Width*.
  
 Using the toolbar, click the Actual Size, Fit in Window, and Fit Width buttons.
  
 !worddave97539c1695925a8acc7c520131efd0d.png|height=39,width=81!
  
 h5. 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.
  
 !worddavc60ee57d3aefcc2c0161f46b63e9f46b.png|height=38,width=64!
  
 {anchor:usingkeyboardmanipulation}
 h4. 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. |
  
 | *Keyboard* *or* *Mouse* *Action* | *Result* |
 | 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. |
  
 {anchor:usingsearch}
 h4. 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.
  
 !SearchResults.png|height=426,width=700!
  
 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.
  
 {anchor:usingannotations}
 h4. Working with Annotations
  
 The Viewer RI is able to display and add / edit / remove Link annotations from a PDF document.
  
 To view, edit, or delete an existing annotation, first use the Select Tool to select an existing annotation. Once an annotation is selected:
 * It's properties will be displayed in the Annotations pane of the Utility Panel. These can be edited directly in the Annotations pane.
 * It can be moved via dragging it to a new location on the page with the mouse.
 * It can be deleted/removed by pressing the *Delete* key, or the *Ctrl-D* / *Cmd-D* key (OS X).
  
 !AnnotationPane.png|height=426,width=600!
  
 To create a new annotation, use the Link Annotation Tool. With the tool selected, the mouse can be used to select a rectangular region on the page that will form the extent of the new link annotation. Once the region is defined, the Annotations pane in the Utility Panel can be used to define its attributes.
  
 {anchor:usingdisplaypermissions}
 h4. 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*.
  
 !worddav0ab06e03cb6d83aa842faa526b30596c.png|height=281,width=217!
  
 To display other information about an open PDF document, such as the creator and modification dates, select *File* *>* *Document* *Information*.
  
 {anchor:usingexportsvg}
 h4. Exporting a PDF File to SVG
  
 SVG support is available if you have configured the optional Batik SVG library. For more information, see {color:#004ca5}*[Batik Library for SVG Support]*{color}.
  
 To export a PDF file as an SVG file
 # If Batik is configured, select *File* *>* *Export* *SVG*.
 # In the Export as SVG dialog, specify a location and filename and click *OK*.
  
  
 {anchor:usingexporttxt}
 h4. 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:
 # Select *File* *>* *Export* *Text*.
 # In the Export Document Text dialog, specify a location and filename and click *OK*.
  
  
 {anchor:usingprint}
 h4. Printing a PDF File
  
 To print a PDF file with a printer dialog, select *File* > *Print.*
  
 Alternatively, from the toolbar, click the !worddavf8376f78f9fe5d8d7f026d28e32c09e4.png|height=28,width=24! (*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*.
  
 {anchor:usingsave}
 h4. Saving a PDF File
  
 To save a copy and any annotation related changes of the PDF file you are viewing:
 # Select *File* *>* *Save As*.
 # In the *Save As* dialog box, navigate to a location for the file, type a unique filename and click *OK*.
  
  
 {anchor:usingclose}
 h4. Closing a PDF File
  
 To close the PDF file you are viewing, leaving the application open, select *File* *>* *Close*.
  
 {anchor:usingexit}
 h4. Exiting the ICEpdf Viewer Application
  
 To exit from the ICEpdf Viewer and close any open files, select *File* *>* *Exit*.
 \\
 \\

© Copyright 2017 ICEsoft Technologies Canada Corp.