com.qoppa.pdfViewer
Class PDFViewerBean

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.qoppa.pdfViewer.PDFViewerBean
All Implemented Interfaces:
IDocumentListener, IPassword, IPDFActionHandler, IPDFOpener, ActionListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:
PDFNotesBean

public class PDFViewerBean
extends JPanel
implements KeyListener, ActionListener, IPassword, IDocumentListener, IPDFActionHandler, IPDFOpener

PDFViewer bean is a component that can be used to display PDF documents within an application or an applet. The bean takes a PDF document as a file name, a URL or an InputStream, reads the document and then displays the document, allowing the user to navigate through the document.

Author:
Qoppa Software
See Also:
Serialized Form

Nested Class Summary
static class PDFViewerBean.KeyInfoViewer
           This is the Main-Class for the jPDFViewer.jar that can generate server key requests, validate a key, and display server information.
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
 
Field Summary
static int PAGEMODE_CONTINUOUS
          Continuous page display mode.
static int PAGEMODE_COVER
          Facing pages display mode with cover page.
static int PAGEMODE_COVER_CONTINUOUS
          Continuous facing pages display mode with cover page.
static int PAGEMODE_FACING
          Facing pages display mode.
static int PAGEMODE_FACING_CONTINUOUS
          Continuous facing pages display mode.
static int PAGEMODE_SINGLEPAGE
          Single page display mode.
static int SPLITPOLICY_NEVER_VISIBLE
          Never show the split pane.
static int SPLITPOLICY_USEDOCUMENTPAGEMODE
          Use the setting inside the PDF document to determine the visibility of the split pane.
static int ZOOMMODE_FITPAGE
          FitPage zoom mode changes the scale when the window is resized so that the page is displayed using the maximum available space.
static int ZOOMMODE_FITWIDTH
          FitWidth zoom mode changes the scale when the window is resized so that the full width of the page is displayed using the maximum available space.
static int ZOOMMODE_NORMAL
          Normal zoom mode means that the scale remains the same when the window is resized.
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PDFViewerBean()
          Construct the PDFViewerBean.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Handles toolbar actions.
 void addAnnotationToSelection(Annotation annot)
          Adds the given Annotation's component to the list of selected components.
 void addHistoryListener(HistoryListener listener)
          Adds a HistoryListener to the PDFViewerBean.
 void clearDocument()
          Clears any loaded document.
 void closeTextSearch()
          Closes the text search box.
 void deselectAnnotation(Annotation annot)
          Removes the given Annotation's component to the list of selected components.
 void documentChanged(DocumentEvent de)
          Internal method, do not use.
 AcroForm getAcroForm()
          Returns the AcroForm in this document.
 IAnnotationManager getAnnotationManager()
          Returns the annotation manager for this PDFViewerBean.
 AttachmentPanel getAttachmentPanel()
          Returns an interface to allow access to the attachment panel.
 BookmarkPanel getBookmarkPanel()
          Returns an interface to allow access to the bookmarks panel.
 CommentPanel getCommentPanel()
          Returns an interface to allow access to the comment panel.
 GotoPageAction getCurrentLocation()
          Returns the current location of the viewer as a GotoPageAction.
 IPDFDocument getDocument()
          Returns the PDF document currently displayed.
 InitialViewSettings getInitialViewSettings()
          Returns the InitialViewSettings object that specifies what page mode, page layout, and magnification values should be used when opening a document.
 LayerPanel getLayerPanel()
          Returns an interface to allow access to the layer panel.
 LocationHistory getLocationHistory()
          Gets the LocationHistory for the current document.
 int getPageByLocation(int x, int y)
          Returns the index of a page given an x, y location on the document.
 int getPageCount()
          Returns the number of pages in the current document.
 int getPageMode()
          Returns the page viewing mode for viewer.
 int getPageNumber()
          Returns the currently displayed page.
 JComponent getPageView(int pageNumber)
          Returns the page view component for the given page number.
 PageViewPanel getPageViewPanel()
          Returns an interface to allow access to the page view panel.
 IPassword getPasswordHandler()
          Returns the currently registered password handler.
 String[] getPasswords()
          Standard implementation of the password handler.
 JRootPane getRootPane()
          Returns a reference to the PDFViewerBean root pane.
 int getRotation()
          Returns the current rotation.
 int getScale()
          Deprecated. Replaced by getScale2D()
 double getScale2D()
          Returns the current scale used to display the PDF document in double precision.
 JScrollPane getScrollPane()
          Returns a reference to the PDFViewerBean scroll pane.
 TextSelection getSelectedText()
          Gets the current text selection (if any page has selected text) in the document.
 TextSelectionContextMenu getSelectTextContextMenu()
          Deprecated. Use getPageViewPanel.getTextSelectionContextMenu()
 SelectToolbar getSelectToolbar()
          Returns the selection toolbar.
 SignaturePanel getSignaturePanel()
          Returns an interface to allow access to the signature panel.
 int getSplitPolicy()
          Gets the viewer's split window policy.
 ISubmitActionEmailHandler getSubmitActionEmailHandler()
           
 ThumbnailPanel getThumbnailPanel()
          Returns an interface to allow access to the thumbnail panel.
 PDFToolbar getToolbar()
          Returns the navigation toolbar.
 ButtonGroup getToolbarButtonGroup()
          Returns a reference to the button group used to toggle some of the tools in the toolbar.
static String getVersion()
          Returns version string for jPDFViewer.
 PageViewContextMenu getViewerContextMenu()
          Deprecated. Use getPageViewPanel.getPageContextMenu()
 IWatermark getWatermark()
          Returns the watermark for the PDFViewerBean.
 WidgetHandler getWidgetHandler()
          Returns the WidgetHandler to be used to set the value to a FormField when its corresponding WidgetComponent is modified.
 int getZoomMode()
          Get the current zoom mode.
 void gotoNextView()
          PDFViewer maintains a history of page views.
 void gotoPreviousView()
          PDFViewer maintains a history of page views.
 void handleAction(Action action)
          This method will handle PDF actions initiated by a click on a link.
 boolean isAttachmentsTabSelected()
          Deprecated. Replaced with getAttachmentPanel().isPaneSelected()
 boolean isBookmarksTabSelected()
          Deprecated. Replaced with getBookmarkPanel().isPaneSelected()
 boolean isCommentComponentsVisible()
          Returns whether comments are visible on the PDFViewerBean.
 boolean isCommentsTabSelected()
          Deprecated. Replaced with getCommentPanel().isPaneSelected()
 boolean isCommentsVisible()
          Deprecated. Replaced with isCommentComponentsVisible()
 boolean isFieldsHighlight()
          Returns whether or not the fields should be highlighted.
 boolean isIncrementalLoading()
          Return the value of the incremental loading flag.
 boolean isLayersTabSelected()
          Deprecated. Replaced with getLayerPanel().isPaneSelected()
 boolean isPagesTabSelected()
          Deprecated. Replaced with getThumbnailPanel().isPaneSelected()
 boolean isSignaturesTabSelected()
          Deprecated. Replaced with getSignaturePanel().isPaneSelected()
 boolean isSplitOpen()
          Returns whether the split window is open or not.
 void keyPressed(KeyEvent e)
          Handle key pressed events.
 void keyReleased(KeyEvent e)
          Fullfill the KeyListener interfaces.
 void keyTyped(KeyEvent e)
          Fullfill the KeyListener interfaces.
 void loadPDF(InputStream inStream)
          Load and display a PDF document using an InputStream.
 void loadPDF(PDFSource source)
          Load and display a PDF document using an object that implements PDFSource.
 void loadPDF(String fileName)
          Load and display a PDF document using a file name.
 void loadPDF(URL url)
          Load and display a PDF document using a URL.
 void openFile()
          Initiates the file open process.
 void openFile(PDFViewerBean viewerBean)
          Initiates the file open process.
 void print(PrintSettings printSettings)
          Prints the PDF document to a printer.
 void removeHistoryListener(HistoryListener listener)
          Removes a HistoryListener.
 void rotateCCW()
          Rotates pages 90 degrees counter-clockwise.
 void rotateCW()
          Rotates pages 90 degrees clockwise.
 void scrollToAnnotation(Annotation annot)
          If annot is not visible, this method will scroll to it.
 void scrollToPage(int pageNumber, int x, int y)
          Scroll to the given page and make sure that point (x,y) is visible on the page by scrolling to it if needed.
 void scrollToPage(int pageNumber, int x, int y, boolean center)
          Scroll to the given page and make sure that point (x,y) is visible on the page by scrolling to it if needed.
 void selectAnnotation(Annotation annot)
          Selects the given Annotation's component.
static boolean setAppletKey(String key, Applet applet)
          Sets product key when running jPDFViewer in an applet.
 void setCommentComponentsVisible(boolean visible)
          This method will set hiding of comments components on and off.
 void setCommentsVisible(boolean visible)
          Deprecated. Replaced with getCommentPanel().setActive()
 void setDocument(IPDFDocument pdfDoc)
          Sets this bean's document.
 void setFieldsHighlight(boolean highlight)
          Highlight any fields in the document.
 void setHorzDividerLocation(int location)
          Sets the location, in pixels, of the horizontal divider.
 void setIncrementalLoad(boolean incrementalLoading)
          Sets the flag for incremental loading of PDF files.
 void setInvertColorsMode(boolean invertMode)
          Sets the page to paint in inverted mode: Black will show as white and white as black.
static boolean setKey(String key)
          Sets product key.
 void setLocationHistory(LocationHistory history)
          Sets the LocationHistory associated with the document currently being viewed.
 void setPage(int pageNumber)
          Changes the currently displayed page.
 void setPageMode(int pageMode)
          Sets the page viewing mode in the viewer.
 void setPasswordHandler(IPassword pwdHandler)
          Override the standard password handler with a user password handler.
 void setPDFOpener(IPDFOpener opener)
          Sets the PDF opener for this bean.
 void setPrintSettings(PrintSettings printSettings)
          Sets the print settings to be used when the print button is activated from the toolbar.
 void setRotation(int rotation)
          Sets the current rotation.
 void setScale(int scale)
          Deprecated. - Use setScale2D()
 void setScale2D(double scale)
          Changes the display scale for the PDF document.
 void setSnapshotHandler(ISnapshotHandler handler)
          By default, the PDFViewerBean will place the BufferedImage in the system clipboard.
 void setSplitOpen(boolean open)
          Opens or closes the split window depending on the parameter.
 void setSplitPolicy(int splitPolicy)
          Sets the viewer's split window policy.
 void setSplitVisible(boolean visible)
          Method to show or hide the split pane functionality.
 void setSplitVisible(boolean visible, boolean open)
          Deprecated. Replaced with setSplitVisible(boolean) and setSplitOpen(boolean)
 void setSubmitActionEmailHandler(ISubmitActionEmailHandler handler)
          By default, the PDFViewerBean will ___________________________.
 void setTabCommentsVisible(boolean visible)
          Deprecated. Replaced with getCommentPanel().setPaneVisible(visible)
static void setTextSelectionColors(Color xorColor, Color fgndColor)
          Set the colors used to highlight text on search results.
 void setVertDividerLocation(int location)
          Sets the location, in pixels, of the vertical divider.
 void setWatermark(IWatermark watermark)
          Sets the watermark for the PDFViewerBean.
 void setZoomMode(int zoomMode)
          Sets the current zoom mode.
 void showError(String msg, Throwable t)
          Convenience method to display an error message.
 void showMessage(String msg)
          Convenience method to display a message using this PDFViewerBean as the message dialog's parent.
 void showTabAttachments()
          Deprecated. Replaced with getAttachmentPanel().setPaneVisible(true)
 void showTabBookmarks()
          Deprecated. Replaced with getBookmarkPanel().setPaneVisible(true)
 void showTabLayers()
          Deprecated. Replaced with getLayerPanel().setPaneVisible(true)
 void showTabSignature()
          Deprecated. Replaced with getSignaturePanel().setPaneVisible(true)
 void showTabThumbnails()
          Deprecated. Replaced with getThumbnailPanel().setPaneVisible(true)
 void startLoupeTool()
          This method activates the loupe tool.
 void startMagnifyRect()
          This method activates the magnification rectangle tool.
 void startTextSearch()
          This method starts the text searching process.
 void startTextSearch(String search)
          This method shows the text search dialog and tells it to search for a string.
 void startTextSelection()
          This methods activates the text selection tool.
 void stopTextSelection()
          This method stops the text selection tool and activates the "hand" tool.
 void zoomToRect(Rectangle2D zoomRect)
          Zooms the viewer to a particular rectangle on the document.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SPLITPOLICY_USEDOCUMENTPAGEMODE

public static final int SPLITPOLICY_USEDOCUMENTPAGEMODE
Use the setting inside the PDF document to determine the visibility of the split pane. A PDF document can contain a setting that tells a viewer whether to show the page thumbnails, document outline or other panes. When the split policy in jPDFViewer is set to this value, the viewer will read and use this setting. This is the default setting.

See Also:
Constant Field Values

SPLITPOLICY_NEVER_VISIBLE

public static final int SPLITPOLICY_NEVER_VISIBLE
Never show the split pane.

See Also:
Constant Field Values

ZOOMMODE_NORMAL

public static final int ZOOMMODE_NORMAL
Normal zoom mode means that the scale remains the same when the window is resized.

See Also:
Constant Field Values

ZOOMMODE_FITPAGE

public static final int ZOOMMODE_FITPAGE
FitPage zoom mode changes the scale when the window is resized so that the page is displayed using the maximum available space.

See Also:
Constant Field Values

ZOOMMODE_FITWIDTH

public static final int ZOOMMODE_FITWIDTH
FitWidth zoom mode changes the scale when the window is resized so that the full width of the page is displayed using the maximum available space.

See Also:
Constant Field Values

PAGEMODE_CONTINUOUS

public static final int PAGEMODE_CONTINUOUS
Continuous page display mode. All pages are visible and can scroll across pages using the scroll bar and the hand tool.

See Also:
Constant Field Values

PAGEMODE_SINGLEPAGE

public static final int PAGEMODE_SINGLEPAGE
Single page display mode. Only one page is visible at a time. The hand tool and scroll bar will not go across pages, user needs to use the next and previous page buttons to do this.

See Also:
Constant Field Values

PAGEMODE_FACING

public static final int PAGEMODE_FACING
Facing pages display mode. Two pages are displayed next to each other. The hand tool and scroll bar will not move to the next two pages, only the next and previous page buttons will go up and down the document, two pages at a time.

See Also:
Constant Field Values

PAGEMODE_FACING_CONTINUOUS

public static final int PAGEMODE_FACING_CONTINUOUS
Continuous facing pages display mode. Two pages are displayed next to each other, and all pages in the document are displayed. Hand tool and scroll bar can be used to move up and down the document as well as the next and previous page buttons.

See Also:
Constant Field Values

PAGEMODE_COVER

public static final int PAGEMODE_COVER
Facing pages display mode with cover page. The first page is displayed by itself and subsequent pages are displayed with two pages next to each other. The hand tool and scroll bar will not move to the next two pages, only the next and previous page buttons will go up and down the document, two pages at a time.

See Also:
Constant Field Values

PAGEMODE_COVER_CONTINUOUS

public static final int PAGEMODE_COVER_CONTINUOUS
Continuous facing pages display mode with cover page. The first page is displayed by itself and subsequent pages are displayed with two pages next to each other, and all pages in the document are displayed. Hand tool and scroll bar can be used to move up and down the document as well as the next and previous page buttons.

See Also:
Constant Field Values
Constructor Detail

PDFViewerBean

public PDFViewerBean()
Construct the PDFViewerBean.

Method Detail

setDocument

public void setDocument(IPDFDocument pdfDoc)
Sets this bean's document. When this method is called, the bean will go back to page 1 of the document and reset the page control in the toolbar. The method will also start generating a new set of thumbviews for the pages.

Parameters:
pdfDoc - The new document.

isAttachmentsTabSelected

public boolean isAttachmentsTabSelected()
Deprecated. Replaced with getAttachmentPanel().isPaneSelected()

Returns true if the attachments tab is selected, otherwise false.

See Also:
getAttachmentPanel()

isBookmarksTabSelected

public boolean isBookmarksTabSelected()
Deprecated. Replaced with getBookmarkPanel().isPaneSelected()

Returns true if the bookmarks tab is selected, otherwise false.

See Also:
getBookmarkPanel()

isCommentsTabSelected

public boolean isCommentsTabSelected()
Deprecated. Replaced with getCommentPanel().isPaneSelected()

Returns true if the comments tab is selected, otherwise false.


isLayersTabSelected

public boolean isLayersTabSelected()
Deprecated. Replaced with getLayerPanel().isPaneSelected()

Returns true if the layers tab is selected, otherwise false.

See Also:
getLayerPanel()

isPagesTabSelected

public boolean isPagesTabSelected()
Deprecated. Replaced with getThumbnailPanel().isPaneSelected()

Returns true if the pages tab is selected, otherwise false.

See Also:
getThumbnailPanel()

isSignaturesTabSelected

public boolean isSignaturesTabSelected()
Deprecated. Replaced with getSignaturePanel().isPaneSelected()

Returns true if the signature tab is selected, otherwise false.

See Also:
getSignaturePanel()

showTabBookmarks

public void showTabBookmarks()
Deprecated. Replaced with getBookmarkPanel().setPaneVisible(true)

This methods will ensure that the bookmarks tab is showing. It will first ensure that the split pane is open and visible and then select the bookmarks tab.

See Also:
getBookmarkPanel()

showTabThumbnails

public void showTabThumbnails()
Deprecated. Replaced with getThumbnailPanel().setPaneVisible(true)

This methods will ensure that the thumbnails tab is showing. It will first ensure that the split pane is open and visible and then select the thumbnails tab.

See Also:
getThumbnailPanel()

setTabCommentsVisible

public void setTabCommentsVisible(boolean visible)
Deprecated. Replaced with getCommentPanel().setPaneVisible(visible)

This method will set the visibility of the comments panel.

Parameters:
visible - The new visibility state.

setCommentsVisible

public void setCommentsVisible(boolean visible)
Deprecated. Replaced with getCommentPanel().setActive()

This method will turn viewing of comments on or off. When viewing is turned off, the comments pane will not be visible or accessible and the comments will not be shown on the component.

Parameters:
visible - Comment visibility flag

setCommentComponentsVisible

public void setCommentComponentsVisible(boolean visible)
This method will set hiding of comments components on and off. When false, comment components will be dynamically hidden. Comments will still show in the comment pane, but will not be displayed in the viewer. They will also not be rendered when printing. When true, comment components will be displayed as normal.

Parameters:
visible - Comment visibility flag

isCommentComponentsVisible

public boolean isCommentComponentsVisible()
Returns whether comments are visible on the PDFViewerBean.

Returns:
commentComponentsVisible true if the comments are visible, otherwise false

isCommentsVisible

public boolean isCommentsVisible()
Deprecated. Replaced with isCommentComponentsVisible()

Returns whether comments are visible on the component.


showTabAttachments

public void showTabAttachments()
Deprecated. Replaced with getAttachmentPanel().setPaneVisible(true)

This methods will ensure that the file attachment tab is showing. It will first ensure that the split pane is open and visible and then select the file attachment tab.

See Also:
getAttachmentPanel()

showTabSignature

public void showTabSignature()
Deprecated. Replaced with getSignaturePanel().setPaneVisible(true)

This methods will ensure that the signature tab tab is showing. It will first ensure that the split pane is open and visible and then select the signature tab.

See Also:
getSignaturePanel()

showTabLayers

public void showTabLayers()
Deprecated. Replaced with getLayerPanel().setPaneVisible(true)

This methods will ensure that the layers panel is showing. It will first ensure that the split pane is open and visible and then select the layers panel.

See Also:
getLayerPanel()

handleAction

public void handleAction(Action action)
This method will handle PDF actions initiated by a click on a link. If the action is a URL, the method will open a new browser window to show the link. If the action is to launch a file, the method will call the operating system to open the file with the registered program.

This method can be overridden to handle actions in a custom manner. The parameter passed in will be an instance of an object derived from Action and can be tested using 'instanceof' to determine the kind of action.

Specified by:
handleAction in interface IPDFActionHandler
Parameters:
action - Object describing the action.

setSubmitActionEmailHandler

public void setSubmitActionEmailHandler(ISubmitActionEmailHandler handler)
By default, the PDFViewerBean will ___________________________. The host application can provide custom functionality by setting a different handler for the SubmitActionEmailHandler.

Parameters:
handler - IEmailSubmitButtonHandler implementation

getSubmitActionEmailHandler

public ISubmitActionEmailHandler getSubmitActionEmailHandler()

getAcroForm

public AcroForm getAcroForm()
Returns the AcroForm in this document. Returns null if the document has no fields. Use this method to get a reference to a PDF document's AcroForm to be able to get and set field data.

Returns:
AcroForm The AcroForm object for this document.

getDocument

public IPDFDocument getDocument()
Returns the PDF document currently displayed.

Returns:
The current document.

loadPDF

public void loadPDF(URL url)
             throws PDFException
Load and display a PDF document using a URL.

Parameters:
url - URL pointing to the location of the PDF document.
Throws:
PDFException

loadPDF

public void loadPDF(PDFSource source)
             throws PDFException
Load and display a PDF document using an object that implements PDFSource.

Parameters:
source - Object that implements the PDFSource interface.
Throws:
PDFException

clearDocument

public void clearDocument()
Clears any loaded document.


loadPDF

public void loadPDF(InputStream inStream)
             throws PDFException
Load and display a PDF document using an InputStream.

Parameters:
inStream - InputStream used to read the PDF document.
Throws:
PDFException

loadPDF

public void loadPDF(String fileName)
             throws PDFException
Load and display a PDF document using a file name.

Parameters:
fileName - Name of the PDF document file.
Throws:
PDFException

setScale

public void setScale(int scale)
Deprecated. - Use setScale2D()

Changes the display scale for the PDF document.

Parameters:
scale - Magnification factor as a percentage. 100 is true size.

setScale2D

public void setScale2D(double scale)
Changes the display scale for the PDF document.

Parameters:
scale - Magnification factor as a percentage. 100 is true size.

getScale

public int getScale()
Deprecated. Replaced by getScale2D()

Returns the current scale used to display the PDF document rounded down to the nearest integer

Returns:
Current display scale

getScale2D

public double getScale2D()
Returns the current scale used to display the PDF document in double precision.

Returns:
Current display scale.

getToolbar

public PDFToolbar getToolbar()
Returns the navigation toolbar. Host applications can use this method to be able to change the behaviour of the toolbar, such as making buttons visible/invisible, adding listeners, etc. Please see PDFToolbar for details.

Returns:
The bean's toolbar.

getSelectToolbar

public SelectToolbar getSelectToolbar()
Returns the selection toolbar. This toolbar has three icons, the hand icon to allow users to drag the document around with the mouse, the text select icon to let the user select text in the document, and the snapshot icon to allow users to capture an image. As with the navigation toolbar, the host application can choose not to show this toolbar by calling getSelectToolbar().setVisible (false).

Returns:
Reference to the selection toolbar.

actionPerformed

public void actionPerformed(ActionEvent e)
Handles toolbar actions. This method is necessary to implement the ActionListener interface. The bean is registered with all buttons in the toolbar to handle their actions. A derived class can override this method to customize the behavior of the toolbar buttons.

Specified by:
actionPerformed in interface ActionListener
Parameters:
e - The action event.

setSnapshotHandler

public void setSnapshotHandler(ISnapshotHandler handler)
By default, the PDFViewerBean will place the BufferedImage in the system clipboard. The host application can provide custom functionality by setting a different handler for the snapshot tool.

Parameters:
handler - ISnapshotHandler implementation

getRotation

public int getRotation()
Returns the current rotation.

Returns:
The bean's current rotation in degrees, valid values are 0, 90, 180 and 270.

setRotation

public void setRotation(int rotation)
Sets the current rotation. Valid values are only 0, 90, 180 and 270.

Parameters:
rotation - Rotation angle in degrees.

rotateCW

public void rotateCW()
Rotates pages 90 degrees clockwise.


rotateCCW

public void rotateCCW()
Rotates pages 90 degrees counter-clockwise.


openFile

public void openFile()
              throws PDFException
Initiates the file open process. This method is normally called when a user presses the open file button in the toolbar but can also be called programmatically by the host application. The method will call the currently registered pdf opener to prompt the user to choose a file. The default pdf opener shows a file chooser dialog to allow the user to choose a file on the local drives.

Throws:
PDFException

openFile

public void openFile(PDFViewerBean viewerBean)
              throws PDFException
Initiates the file open process. This method fulfills the IPDFOpener interface and is the default implementation of a PDF opener. The method shows a file chooser dialog to let the user choose a file.

Specified by:
openFile in interface IPDFOpener
Parameters:
viewerBean - The PDFViewerBean object that initiated the open file action.
Throws:
PDFException

getPageNumber

public int getPageNumber()
Returns the currently displayed page.

Returns:
int Currently displayed page.

getPageView

public JComponent getPageView(int pageNumber)
Returns the page view component for the given page number. The method returns an object of type JComponent, but this object is also guaranteed to implement IPDFPageView, so it can be casted without problems.

Parameters:
pageNumber - Number of the page to return. Pages are indexed starting at 1.
Returns:
JComponent Reference to a component object that displays the given page. null if the pageNumber is out of range.

getPageCount

public int getPageCount()
Returns the number of pages in the current document.

Returns:
int Number of pages in the PDF document.

getPasswords

public String[] getPasswords()
Standard implementation of the password handler. This method shows a simple dialog with a password field to allow the user to enter a password.

The standard password handler can be overridden by calling setPasswordHandler

Specified by:
getPasswords in interface IPassword
Returns:
byte array containing the password.

print

public void print(PrintSettings printSettings)
           throws PDFPermissionException,
                  PrinterException
Prints the PDF document to a printer. This method will first prompt the user to choose a system printer and then it will print the document.

If finer control of printing is necessary, the IPDFDocument object return by the getDocument() method implements both Printable and Pageable. The host application can then create its own PrinterJob and set any settings necessary, then call either setPageable or setPrintable with the IPDFDocument object and then start the print job.

Parameters:
printSettings - Print job settings. Use this object to tell jPDFViewer how to print the document. If null, the library will print using default settings.
Throws:
PDFPermissionException
PrinterException

setPrintSettings

public void setPrintSettings(PrintSettings printSettings)
Sets the print settings to be used when the print button is activated from the toolbar. The print settings will be cloned so that any modifications to the PrintSettings object will not be reflected when printing.

Parameters:
printSettings - Print job settings. Use this object to tell jPDFViewer how to print the document.

setPage

public void setPage(int pageNumber)
Changes the currently displayed page.

Parameters:
pageNumber - Page to display. Pages are indexed starting at 1.

getVersion

public static String getVersion()
Returns version string for jPDFViewer. If this is the demo version, the return string will contain 'Demo Version' at the end.


setPasswordHandler

public void setPasswordHandler(IPassword pwdHandler)
Override the standard password handler with a user password handler. If a document is password protected, jPDFViewer will call the password handler to obtain a password.

Parameters:
pwdHandler - User object that implements IPasswordHandler.

setPDFOpener

public void setPDFOpener(IPDFOpener opener)
Sets the PDF opener for this bean. The PDF opener gets called whenever a user clicks on the open button on the toolbar. By default, PDFViewerBean implements IPDFOpener by showing a file dialog that lets the user choose a local file. The host application can choose to override this to show a custom opener, for cases where documents might come from the web, or other locations.

Parameters:
opener - The new object that implements IPDFOpener

getPasswordHandler

public IPassword getPasswordHandler()
Returns the currently registered password handler. The password handler is used when the library opens a document that is protected by passwords.

Returns:
The current password handler.

setKey

public static boolean setKey(String key)
Sets product key. Use this method after purchasing to remove evaluation restrictions.

Parameters:
key - Product key.

setAppletKey

public static boolean setAppletKey(String key,
                                   Applet applet)
Sets product key when running jPDFViewer in an applet. Use this method after purchasing to remove evaluation restrictions.

Parameters:
key - Product key.
applet - The applet that we are running in.

setSplitVisible

public void setSplitVisible(boolean visible,
                            boolean open)
Deprecated. Replaced with setSplitVisible(boolean) and setSplitOpen(boolean)

Method to show or hide the split pane functionality. When visible, the left side of the bean will show thumbnails, bookmarks, attachments, layers, signatures, and comments in the PDF file. When not visible, the buttons and panels will not be displayed.

Parameters:
visible - The new split pane visibility.
open - Determines whether the split pane should be open or closed

setSplitVisible

public void setSplitVisible(boolean visible)
Method to show or hide the split pane functionality. When visible is true, the left side of the bean will show a panel with buttons for thumbnails, bookmarks, attachments, layers, signatures, and comments in the PDF file. When visible is false, the buttons and panels will not be displayed.

Parameters:
visible - The split pane visibility

isSplitOpen

public boolean isSplitOpen()
Returns whether the split window is open or not.

Returns:
Open state of the split window.

setSplitOpen

public void setSplitOpen(boolean open)
Opens or closes the split window depending on the parameter. If true and the corresponding button panel is not currently visible, the button panel will also be made visible.

Parameters:
open - Desired open state of the split window.

setVertDividerLocation

public void setVertDividerLocation(int location)
Sets the location, in pixels, of the vertical divider. This is the divider that separates the thumbnail and bookmark panes on the left to the content pane on the right.

Parameters:
location - The new location for the divider.

setHorzDividerLocation

public void setHorzDividerLocation(int location)
Sets the location, in pixels, of the horizontal divider. This is the divider that separates the comments pane at the bottom to the content pane on the top.

Parameters:
location - THe new location for the divider.

selectAnnotation

public void selectAnnotation(Annotation annot)
Selects the given Annotation's component. If the Annotation's component is not visible, the PDFViewerBean will first scroll to ensure that it is, and then select the component.

Parameters:
annot - the Annotation to select

scrollToAnnotation

public void scrollToAnnotation(Annotation annot)
If annot is not visible, this method will scroll to it.

Parameters:
annot - the Annotation to select

addAnnotationToSelection

public void addAnnotationToSelection(Annotation annot)
Adds the given Annotation's component to the list of selected components. If the list is currently empty and the component is not visible, the viewbean will scroll to it. If an annotation is already selected, no scroll will occur.

Parameters:
annot - the Annotation to select

deselectAnnotation

public void deselectAnnotation(Annotation annot)
Removes the given Annotation's component to the list of selected components.

Parameters:
annot - the Annotation to select

scrollToPage

public void scrollToPage(int pageNumber,
                         int x,
                         int y)
Scroll to the given page and make sure that point (x,y) is visible on the page by scrolling to it if needed. (x,y) are given in crop box coordinates, the crop box being the visible area of the page.

Parameters:
pageNumber - the page number starting at 1.
x - the horizontal position to scroll to on the page
y - the vertical position to scroll to on the page

scrollToPage

public void scrollToPage(int pageNumber,
                         int x,
                         int y,
                         boolean center)
Scroll to the given page and make sure that point (x,y) is visible on the page by scrolling to it if needed. The location can optionally be centered on the page. (x,y) are given in crop box coordinates, the crop box being the visible area of the page.

Parameters:
pageNumber - the page number starting at 1.
x - the horizontal position to scroll to on the page
y - the vertical position to scroll to on the page
center - the scrolled to coordinate will be centered when set to true, otherwise it will be in the top/left

documentChanged

public void documentChanged(DocumentEvent de)
Internal method, do not use.

Specified by:
documentChanged in interface IDocumentListener

getScrollPane

public JScrollPane getScrollPane()
Returns a reference to the PDFViewerBean scroll pane. Use this method when finer control of the scroll pane and scroll behaviour is need.

Returns:
The scroll pane used inside the PDFViewerBean.

getRootPane

public JRootPane getRootPane()
Returns a reference to the PDFViewerBean root pane. The document is displayed within a root pane that is then added to a scroll pane. Use this method when finer control of the root pane is needed.

Overrides:
getRootPane in class JComponent

getSplitPolicy

public int getSplitPolicy()
Gets the viewer's split window policy. The policy can be one of two values:

Returns:
The current split window policy.

setSplitPolicy

public void setSplitPolicy(int splitPolicy)
Sets the viewer's split window policy. The policy can be one of two values:

Parameters:
splitPolicy - The new split window policy.

showError

public void showError(String msg,
                      Throwable t)
Convenience method to display an error message. This method will look at the exception and customize the error message if the exception is a permissions exception (PDFPermissionException) or an out of memory exception (OutOfMemoryError).

Parameters:
msg - The message string to precede the exception error message.
t - The exception that caused the error.

showMessage

public void showMessage(String msg)
Convenience method to display a message using this PDFViewerBean as the message dialog's parent.

Parameters:
msg - The message string to show to the user.

getPageByLocation

public int getPageByLocation(int x,
                             int y)
Returns the index of a page given an x, y location on the document.

Parameters:
x - The x coordinate of the point.
y - The y coordinate of the point.
Returns:
The index of the page, -1 if the point does not fall on any page.

setInvertColorsMode

public void setInvertColorsMode(boolean invertMode)
Sets the page to paint in inverted mode: Black will show as white and white as black. Colors will be inverted as well by XOR'ing them with all white.

Parameters:
invertMode - The new invert mode.

getZoomMode

public int getZoomMode()
Get the current zoom mode.

Returns:
The current zoom mode, this can either be ZOOMMODE_NORMAL, ZOOMMODE_FITWIDTH, ZOOMMODE_FITPAGE.

setZoomMode

public void setZoomMode(int zoomMode)
Sets the current zoom mode.

Parameters:
zoomMode - The new zoom mode. This value has to be either ZOOMMODE_NORMAL, ZOOMMODE_FITWIDTH, or ZOOMMODE_FITPAGE. If zoomMode is ZOOMMODE_FITWIDTH or ZOOMMODE_FITPAGE, the method will call setScale immediately to adjust the scale so that the page fits in the display window optimally.

zoomToRect

public void zoomToRect(Rectangle2D zoomRect)
Zooms the viewer to a particular rectangle on the document. The rectangle should be in "scroll pane" coordinates, i.e. the entire document, including all pages, is considered one long canvas and the rectangle is the area into this canvas that will be zoomed to.

Parameters:
zoomRect - The rectangle to zoom into

getSelectedText

public TextSelection getSelectedText()
Gets the current text selection (if any page has selected text) in the document.

Returns:
Object containing information about any text that is selected.

startMagnifyRect

public void startMagnifyRect()
This method activates the magnification rectangle tool. This is equivalent to the user pressing on the "magnify rectangle" button on the toolbar.


startLoupeTool

public void startLoupeTool()
This method activates the loupe tool. This is equivalent to the user pressing on the "loupe" button on the toolbar.


startTextSelection

public void startTextSelection()
This methods activates the text selection tool. This is equivalent to the user pressing the "text selection" button on the toolbar.


startTextSearch

public void startTextSearch()
This method starts the text searching process. This is equivalent to the user pressing the "Text Search" button on the toolbar.


startTextSearch

public void startTextSearch(String search)
This method shows the text search dialog and tells it to search for a string.


closeTextSearch

public void closeTextSearch()
Closes the text search box. This is equivalent to the user clicking on the Close button of the search dialog.


stopTextSelection

public void stopTextSelection()
This method stops the text selection tool and activates the "hand" tool. If the bean is not in text selection mode, the method does nothing.


setTextSelectionColors

public static void setTextSelectionColors(Color xorColor,
                                          Color fgndColor)
Set the colors used to highlight text on search results. when highlight text, the viewer draws a rectangle around the text using XOR mode. XOR mode in Java requires two colors, one used for the foreground and the secone one to use in the XOR operation. The sequence of calls are as follows:

Graphics2D.setXORMode (xorColor);
Graphics2D.setColor (fgndColor);

WARNING: These colors are held in static variables, they are used for all instances of PDFViewerBean.

Parameters:
xorColor - The color used in the setXORMode call.
fgndColor - The color used for the foreground in XOR mode.

getThumbnailPanel

public ThumbnailPanel getThumbnailPanel()
Returns an interface to allow access to the thumbnail panel. The interface provides methods to access the panel toolbar as well as to change the thumbnail sizes.

Returns:
Interface to the thumbnails panel

getBookmarkPanel

public BookmarkPanel getBookmarkPanel()
Returns an interface to allow access to the bookmarks panel. The interface provides methods to access the panel's toolbar as well as the bookmark tree.

Returns:
Interface to the bookmark panel

getAttachmentPanel

public AttachmentPanel getAttachmentPanel()
Returns an interface to allow access to the attachment panel. The interface provides methods to access the panel's toolbar as well as the attachment list.

Returns:
Interface to the attachment panel

getLayerPanel

public LayerPanel getLayerPanel()
Returns an interface to allow access to the layer panel. The interface provides methods to access the panel's toolbar and control the panel's visibility.

Returns:
Interface to the layer panel

getSignaturePanel

public SignaturePanel getSignaturePanel()
Returns an interface to allow access to the signature panel. The interface provides methods to access the panel's toolbar and control the panel's visibility.

Returns:
Interface to the signature panel

getPageViewPanel

public PageViewPanel getPageViewPanel()
Returns an interface to allow access to the page view panel. The interface provides methods to access the PopupMenus which appear on the page.

Returns:
Interface to the page view panel

getCommentPanel

public CommentPanel getCommentPanel()
Returns an interface to allow access to the comment panel. The interface provides methods to access the panel's toolbar as well as a list of comments / annotations.

Returns:
Interface to the signature panel

setPageMode

public void setPageMode(int pageMode)
Sets the page viewing mode in the viewer. The mode should be set using one of the predefined values: PAGEMODE_CONTINUOUS, PAGEMODE_SINGLEPAGE, PAGEMODE_FACING, PAGEMODE_FACING_CONTINUOUS, PAGEMODE_FACING_COVER, and PAGEMODE_FACING_CONTINUOUS_COVER

Parameters:
pageMode - The new page mode.

getPageMode

public int getPageMode()
Returns the page viewing mode for viewer. The mode will be one of the predefined values: PAGEMODE_CONTINUOUS, PAGEMODE_SINGLEPAGE, PAGEMODE_FACING and PAGEMODE_FACING_CONTINUOUS


getViewerContextMenu

public PageViewContextMenu getViewerContextMenu()
Deprecated. Use getPageViewPanel.getPageContextMenu()

Returns the ViewerContextMenu used for the content pane.

Returns:
the PageViewContextMenu

getSelectTextContextMenu

public TextSelectionContextMenu getSelectTextContextMenu()
Deprecated. Use getPageViewPanel.getTextSelectionContextMenu()

Returns the ContextMenu used for the content pane during text selection.

Returns:
the TextSelectionContextMenu

getToolbarButtonGroup

public ButtonGroup getToolbarButtonGroup()
Returns a reference to the button group used to toggle some of the tools in the toolbar. This button group can be used by the host application to add additional buttons to the toolbar that should be toggled along with the standard buttons. The tool buttons that are part of the group are the magnification, hand, text select and snapshop tools.

Returns:
A reference to the toolbar's toggle button group.

gotoPreviousView

public void gotoPreviousView()
PDFViewer maintains a history of page views. Calling this method will display the previous view from the history


gotoNextView

public void gotoNextView()
PDFViewer maintains a history of page views. Calling this method will display the next view from the history


keyPressed

public void keyPressed(KeyEvent e)
Handle key pressed events. PDFViewerBean handles page up and page down events to let the user scroll up and down the document using these keys.

Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent e)
Fullfill the KeyListener interfaces. PDFViewerBean does not do anything on key released events.

Specified by:
keyReleased in interface KeyListener

keyTyped

public void keyTyped(KeyEvent e)
Fullfill the KeyListener interfaces. PDFViewerBean does not do anything on key typed events.

Specified by:
keyTyped in interface KeyListener

getCurrentLocation

public GotoPageAction getCurrentLocation()
Returns the current location of the viewer as a GotoPageAction. The return value can then be used in a call to PDFViewerBean.handleAction() to return to this location.

Returns:
The current location in the document, as a GotoPageAction object.

setFieldsHighlight

public void setFieldsHighlight(boolean highlight)
Highlight any fields in the document. Highlighting fields will display a semi-transparent blue rectangle over the field position so that the fields can be more easily seen by the user.

Parameters:
highlight - Boolean flag indicating whether the fields should be highlighted.

isFieldsHighlight

public boolean isFieldsHighlight()
Returns whether or not the fields should be highlighted.

Returns:
Flag indicating whether fields are highlighted.

getAnnotationManager

public IAnnotationManager getAnnotationManager()
Returns the annotation manager for this PDFViewerBean.

Returns:
The annotation manager for this PDFViewerBean

getInitialViewSettings

public InitialViewSettings getInitialViewSettings()
Returns the InitialViewSettings object that specifies what page mode, page layout, and magnification values should be used when opening a document.

Returns:
The InitialViewSettings for this PDFViewerBean.

setWatermark

public void setWatermark(IWatermark watermark)
Sets the watermark for the PDFViewerBean. When a document is loaded, this IWatermark object will be set on the PDF document as it is loaded.

The PDF document will make callbacks to this watermark with the following types.

Parameters:
watermark - the IWatermark to set on the PDF document when it is loaded into the PDFViewerBean.
See Also:
IPDFDocument.setWatermark(com.qoppa.pdf.IWatermark)

getWatermark

public IWatermark getWatermark()
Returns the watermark for the PDFViewerBean.

Returns:
the IWatermark object
See Also:
setWatermark(com.qoppa.pdf.IWatermark)

getWidgetHandler

public WidgetHandler getWidgetHandler()
Returns the WidgetHandler to be used to set the value to a FormField when its corresponding WidgetComponent is modified.

Returns:
WidgetHandler

getLocationHistory

public LocationHistory getLocationHistory()
Gets the LocationHistory for the current document. This interface provides information about the document view history.

See Also:
setLocationHistory(com.qoppa.pdfViewer.history.LocationHistory)

setLocationHistory

public void setLocationHistory(LocationHistory history)
Sets the LocationHistory associated with the document currently being viewed. This can be set when navigating between documents to load an existing LocationHistory for that document.

Parameters:
history - The LocationHistory to load.
See Also:
getLocationHistory()

addHistoryListener

public void addHistoryListener(HistoryListener listener)
Adds a HistoryListener to the PDFViewerBean. The listener will be notified of events relevant to maintaining the LocationHistory.

Parameters:
listener -

removeHistoryListener

public void removeHistoryListener(HistoryListener listener)
Removes a HistoryListener.

Parameters:
listener -

setIncrementalLoad

public void setIncrementalLoad(boolean incrementalLoading)
Sets the flag for incremental loading of PDF files. When a PDF document is loaded, setting this flag to true will load the PDF incrementally, so that the first page of the document can be displayed as quickly as possible.

Parameters:
incrementalLoading - new value of the URL incremental loading flag.

isIncrementalLoading

public boolean isIncrementalLoading()
Return the value of the incremental loading flag.

Returns:
The current value of the URL incremental loading flag.