public class NFSnapshotUtil extends NFSnapshotStatus implements AppletStub
The NFSnapshotUtil utility supports the generation of document snapshots without the need for a web browser. The utility is designed to be operated from a command line window and it accepts one or more filenames or URLs for processing. For each file designated, NFSnapshotUtil reads the HTML file, either directly from the local disk or via a Web server, and generates an image file for each NAMED applet found. The applet tag is commented out in the HTML file and a reference to the new image file is inserted. (Unnamed applets are simply commented out.) As each applet is processed, it is displayed on the screen in a separate window.
The names for the modified HTML file and the image files are automatically derived from the original HTML file designated. For example, if you designate "http://Fred/test.html" as the input file and it contains two applets, then the resulting files will be named:
test.html test0.gif test1.gif
and will be stored in the current directory where the utility is executed. Optionally, you may designate an output directory that will be used to store all resulting files.
NOTE: If you execute the utility on an HTML file in the current directory and you do not change the output directory, then the original HTML file will be overwritten, with the applets commented out.
As with the NFSnapshotApp, the NFSnapshotUtil works best on applets that display graphical images. Applets that contain GUI widgets, such as buttons, entry fields, etc, may not be represented accurately in the resulting GIF images.
The following command line values are supported:
java NFSnapshotUtil [options] url1 url2 ...
-autoclose = exit automatically after processing files
-debug = print debug information
-delay <seconds> = wait for the given number of seconds before creating the image for each applet found. This delay is needed in order to allow the applet to be loaded and initialized. The default delay is 5 seconds.
-output <pathname> = the pathname for the directory where all resulting files should be stored
On startup, NFSnapshotUtil checks for a valid NFLicense.dat file anywhere along the CLASSPATH. If not found, only one input file will be processed per command line and an Evaluation banner will be displayed.
NOTE: If a valid NFLicense.dat file is not somewhere along the CLASSPATH, then all NetCharts applets will display an Evaluation banner initially, which will then be automatically stored in the resulting GIF file.