JavaDjVu - Release 0.8.09
This package contains the source code and documentation for JavaDjVu. JavaDjVu
consists of a reference library and GUI code that may be used to view and
navigate DjVu documents from JVM 1.1 compliant virtual machines.
BUILD REQUIREMENTS:
- JDK 1.5.0 or later.
- GNU bash, version 2.05b or later. (for command line builds)
- NetBeans 4.1 or later. (for GUI builds)
RUNTIME REQUIREMENTS:
- One of J2SE Runtime Environment 1.1.4, J2ME 2.0, or newer releases. JIT highly recommended.
- At least 64MB of memory.
- A java enabled browser such as Internet Explorer,
Mozilla Firefox 1.0, or Netfront 3.1.
NON-SUPPORTED RUNTIME ENVIRONMENTS:
If you are not lucky enough to be using the Sun JVM, you can try
a Java 1.1 compatible virtual machines. Visit:
for a list of virtual machines to try.
INVOKING THE VIEWER:
Primarily, the viewer is intended to be used as an applet. The instructions in
Deployment.html will guide you deploying the applet on
your website. There is limited support for running the viewer as a standalone application.
To do so, you must have Java 1.3 or later installed and in your search path. Assuming both
javadjvu.jar and foo.djvu are in the current directory, the following command line would
be used to view foo.djvu:
java -jar javadjvu.jar foo.djvu
Actually any valid URL may be used. For example, when debugging the following commandline
is invoked:
java -jar javadjvu.jar http://javadjvu.sourceforge.net/examples/
Note that the web browser built into Java does not support current standards. Consiquently,
few websites can actually be browsed successfully with the viewer.
BUILD INSTRUCTIONS:
If you have NetBeans, you may load javadjvu as a NetBeans project
and build, debug, and test from there. Otherwise you may install and configure
GNU bash with your JDK path and execute the following command line:
The resulting files will be populated into the build directory. You
may test your build with the command:
cd example
java -jar ../build/javadjvu.jar
This should open a standalone application browsing the document in the
examples directory. You are now ready to copy the DjVuApplet.class
and javadjvu.jar file to your website.
DEPLOYMENT INSTRUCTIONS:
Basic instructions for deploying a document are listed in the
Deployment.html file.
ADVANCED BUILD INSTRUCTIONS:
JavaDjVu contains the optional components:
applet, menu, toolbar, text, anno, outline, and frame
Each of these components adds to the functionality of the build, at
the cost of a larger file size and a longer download time.
The default is to build all optional components but you may
do a custom build with just the features you wish to use by
listing only the features you want on the build.sh command line.
For example, if you wanted to build an applet with only menu
navigation, and no support for hidden text or annotations you
would use the command:
If you are using NetBeans to build the applet, then comment out
the properties in the build.properties file for the optional components
you do not want to include. For example to disable the menu
option you would change the line:
addon.menu=com/lizardtech/*/menu/*.java
to:
# addon.menu=com/lizardtech/*/menu/*.java
The optional components are further described below:
applet: (adds approximately 137 bytes to the build)
Used to build the DjVuApplet.class. This is required for
using the <APPLET> tag from HTML documents.
menu: (adds approximately 5036 bytes to the build)
Used to add a pop-up menu to the applet. When the user clicks
on the right mouse button, or any mouse button with a CTRL key
the pop-up menu will appear. This will allow users to navigate
multi-page documents, zoom, and access the AboutURL and HelpURL.
This option does not work for most J2ME devices.
keys: (adds approximately 1528 bytes to the build)
Used to add keyboard shortcuts to the applet. The user will be
able to navigate the document using the keyboard. This option does
not work for most J2ME devices.
toolbar: (adds approximately 34012 bytes to the build)
Used to enable a toolbar at the top of each page. This toolbar
may be used for navigating multi-page documents, zoom, and
perform text search functions if "text" has also been
selected.
text: (adds approximately 9988 bytes to the build)
Used to enable underlying support for the hidden text layer.
This enables decoding of TXTa and TXTz chunks in the document.
If combined with the toolbar option, users will be able to
search and view hidden text.
anno: (adds approximately 23358 bytes to the build)
Used to enable hyperlink annotations. This will enable
decoding of ANTa and ANTz chunks. Users will be able to
click on hyperlinks and follow links inside the DjVu document.
outline: (adds approximately 8709 bytes to the build)
Used to enable outline navigation. This option enables the
decoding of the "NAVM" chunks, and using the ouline to
navigate multi-page DjVu documents.
CHANGES:
Version 0.8.08 to 0.8.09
- Fixed a bug in annotation colors for text and lines
- Added an explicit requestFocus to the mouseListeners
Version 0.8.07 to 0.8.08
- Fixed bug in 0.8.07 causing zoom=page and zoom=width to fail
-
- Corrected About dialog path.
Version 0.8.06 to 0.8.07 (DOA)
- Rewrote DataPool to randomly access data, and only cache a finite amount.
- Rewrote DataPool.CachedInputStream to be just CachedInputStream.
- Modified CachedInputStream to take over the role as a data container.
- Changed most uses of DataPool to CachedInputStream.
- Fixed a problem with case insensative searches. Lowercase search terms
should now correctly cause a case insensative search.
- I think the firefox MacOSX freezes have been greatly reduced by updating
the status line from the paint() call.
- Replaced IFFInputStream with IFFEnumerator. This is a much cleaner
implementation and makes the code more readable.
- Changed log output to be to DjVuOptions.out and DjVuOptions.err, so
an applet can redirect the output from System.out and System.err.
- Added DjVuConsole class to debug IE problems with.
- Optimized the IO routines to minimize the number of synchronization locks.
Version 0.8.05 to 0.8.06
- Major changes to the djvubean package to support multipage display mode.
The code could be made more efficient for the case of equal DPI value
for all visible pages.
- Added com.lizardtech.djvubean.keys to support keyboard shortcuts.
- Added param options "keys" and "pagelayout" to support the new code.
- Added a "searchtext" param element to set the initial search string.
- Modified the finder so pressing return repeats the last search function with the current text.
Version 0.8.04 to 0.8.05
- Added missing repaint() calls for the TextArea
- Revised DjVuFilter to use double math instead of long math, as this makes the code more readable
- Revised DjVuFilter not to include undisplayed pixel for non-animated images.
- Revised ToolbarImages to use a toolbar.djvu resource instead of a byte array
- Revised build.xml to include some package information in the manifest
- Changed the main class to Applet, which will print an error if the Frame class can not be loaded.
- Updated the build.sh script to use the build.properties file
- Automatically start prefetching when searching a whole document
- Moved com.lizardtech.djview.frame into a separate jar file.
- Moved the annotation code for djvubean into its own package
- Use alpha channel highlighting instead of XOR highlighting on MacOSX
- Added support for highlight, text, and line annotations.
- For versions of java without a Color(int,boolean) constructor, XOR will be used instead of
ALPHA channels.
Version 0.8.03 to 0.8.04
- Fit Width and fit page failed when the display size was unknown. Fixed by defering
getImageWait until the first paint. This also speeds up the initial loading of the applet.
- Added progressive rendering for Color JB2 to avoid an Exception.
- ZoomFast was missing from the Properties.html file. Added it.
- Added a property for debug.document and set the default to http://javadjvu.sourceforge.net/examples/
- Added VERSION to DjVuOptions
- Changed DjVuBean.isDecoding() to return true when the image is not set. This is neccessary for
the toolbar to correctly initialize which buttons should be enabled.
Version 0.8.02 to 0.8.03
- Revised and refactored most of the API's to add anti-aliasing, prefetching, predecoding, and
progressive decoding.
- Revised the Frame class to allow basic navigation.
- Entirely rewrote the scrolling code for faster performance and less memory usage.
- Fixed the problems that kept MSVM version of Java 1.14 from loading.
- Added the use of references to avoid exhausting memory.
- Fixed the handling of bundled documents not to require the full document prior to
navigating them. (Note: Indirect provide a much better user experience.)
- Updated the NetBeans project to support interactive debugging.