java tool.pdf.info demo.pdf
Exception in thread "main" java.lang.NoClassDefFoundError: tool/pdf/info (wrong name: tool/pdf/Info)
        at java.lang.ClassLoader.defineClass0(Native Method)
Names are case sensitive. Try tool.pdf.Info.

Running in different environments

Can the document viewers or annotation authoring and viewing run as an applet?
No. The only benefit of running as an applet would be easy software installation. Either way you need Java installed, and installing and running the browser is as simple as downloading a file and double-clicking. Running as an applet imposes various hoops to jump through, such as relying on a simple start/stop invocation, limitations in memory allocation, limitations in reading from and writing disk or requiring a cryptographic signature, and so on.
Can it run on Java 1.1? Java 1.3?
No and no. The required Java 1.4 should be available everywhere that earlier versions are and is in general more stable and bug free. Back porting to Java 1.3 would not be easy; removing all the assert statements is no problem, but the code uses numerous Java API classes that were introduced in 1.4, including java.net.URI and IdentityHashMap. Is there any technical reason that you can't use Java 1.4?
Can it run headless (without access to a monitor display), such as from a servlet, so I can do things like rasterize a PDF?
Generally a display is required so that various dimensions, such as font sizes, can be adjusted for screen pixels-per-inch. The code relies on Java graphics libraries that crash if there is no display. Under X11 a symptom is the error Can't connect to X11 window server using ':0.0'. TAP.com has done work to make this possible and licenses.
I see how to run the document tools from the command line, but how can I run them programmatically?
source code to tools - programmatic - more functionality - more tools (rasterize, extract layout coordinates and font family/size and colors) - better suited for J2EE: read from byte[] so can keep PDFs in database, chain operations together, ... TAP.com
Embedding viewers in another application
Running Multivalent as an application and embbed as a window in a Swing application are demonstrated in the source code for the class multivalent.demo. Running it embedded in SWT should be possible, since only the Swing classes used are JFrame and JPanel, and the only AWT is JFileDialog, but this is left as an exercise for the reader.
Multivalent does a lot, but we just need one piece. Can we shrink the JAR size?
The Multivalent.jar file is 2.5MB, which is not large these days. You can save 50% if you're not viewing PDFs with Asian characters by throwing out the CMaps in com/adobe/CMap. Further savings is possible, but in increments of a few K each and are left an an exercise for the reader.


How do I compile the source code?
See the notes in the Developer area.


How can I print?
Adding printing is an good opportunity for someone to contribute to the project. The code now renders to the Graphics object of an off-screen image, and printing should be as easy as rendering to the Java printing Graphics object instead.