public interface ViewerInt
If you are compiling, you will need to download all the examples source files from http://www.idrsolutions.com/how-to-view-pdf-files-in-java/
Run directly from jar with java -cp jpedal.jar org/jpedal/examples/viewer/Viewer or java -jar jpedal.jar
Lots of tutorials on how to configure on our website
There is also a JavaFX Viewer documented at http://files.idrsolutions.com/samplecode/org/jpedal/examples/viewer/OpenViewerFX.java.html
If you want to implement your own Very simple example at http://files.idrsolutions.com/samplecode/org/jpedal/examples/jpaneldemo/JPanelDemo.java.html But we would recommend you look at the full viewer as it is totally configurable and does everything for you.
See also http://javadoc.idrsolutions.com/org/jpedal/constants/JPedalSettings.html for settings to customise
Fully featured GUI viewer and demonstration of JPedal's capabilities
This class provides the framework for the Viewer and calls other classes which provide the following
functions:-
Values commonValues - repository for general settings
Printer currentPrinter - All printing functions and access methods to see if printing active
PdfDecoder decode_pdf - PDF library and panel
ThumbnailPanel thumbnails - provides a thumbnail pane down the left side of page - thumbnails can be clicked on to goto page
PropertiesFile properties - saved values stored between sessions
SwingGUI currentGUI - all Swing GUI functions
SearchWindow searchFrame (not GPL) - search Window to search pages and goto references on any page
Commands currentCommands - parses and executes all options
SwingMouseHandler mouseHandler - handles all mouse and related activity
| Modifier and Type | Method and Description |
|---|---|
void |
addExternalHandler(Map<Integer,Object> newHandler,
int type)
Allows external helper classes to be added to JPedal to alter default functionality.
|
void |
dispose()
run with caution and only at end of usage if you really need
|
Object |
executeCommand(int commandID,
Object[] args)
Execute Jpedal functionality from outside of the library using this method.
|
void |
handleArguments(String[] args)
Have the viewer handle program arguments
|
void |
loadProperties(String props)
Should be called before setupViewer
|
void |
openDefaultFile(String defaultFile)
Allow user to open PDF file to display
|
void |
openDefaultFileAtPage(String defaultFile,
int page)
Allow user to open PDF file to display
|
void |
setRootContainer(Object rootContainer) |
void |
setupViewer()
initialise and run client (default as Application in own Frame)
|
void openDefaultFile(String defaultFile)
defaultFile - The file that will be displayedvoid openDefaultFileAtPage(String defaultFile, int page)
defaultFile - The file that will be displayedpage - The page number on with the displayed file will be openvoid setRootContainer(Object rootContainer)
void loadProperties(String props)
props - the set propertiesvoid setupViewer()
void handleArguments(String[] args)
args - :: Program arguments passed into the Viewer.Object executeCommand(int commandID, Object[] args)
for full details see http://www.idrsolutions.com/access-pdf-viewer-features-from-your-code/
commandID - :: static int value from Commands to spedify which command is wantedargs - :: arguements for the desired commandvoid addExternalHandler(Map<Integer,Object> newHandler, int type)
newHandler - Implementation of interface provided by IDR solutionstype - Defined value into org.jpedal.external.Options classvoid dispose()
Copyright © 2017. All rights reserved.