This is a sample html file to display a XIFF document using the DigiPaper Viewer.
<html> <head> <title>DigiPaper Viewer</title> </head> <body> <h2>The DigiPaper Viewer</h2> <p> <applet code="COM.xerox.digipaper.applet.client.Client" codebase="./" width="640" height="480" archive="client_fullx3.jar"> <param name="fileLoc" value="http://www.cs.cornell.edu/melissa/digipaper/xiff/scantest.xif"> <p> Sorry, the viewer is written in java. <p>
You need a java-enabled browser. </applet> </p> </body> </html>
The resulting display looks like this:
The key aspects are in this portion of the code:
<applet code="COM.xerox.digipaper.applet.client.Client" codebase="./" width="640" height="480" archive="client_fullx3.jar"> <param name="fileLoc" value="http://www.cs.cornell.edu/melissa/digipaper/xiff/scantest.xif"> ... </applet>
The code highlighted in red below is necessary for specifying the applet:
<applet code="COM.xerox.digipaper.applet.client.Client" codebase="./" width="640" height="480" archive="client_fullx3.jar">
In addition to the normal applet parameters, you need to provide the location of the file you want to display. This is done with the PARAM tag.
<param name="fileLoc" value="http://www.cs.cornell.edu/melissa/digipaper/xiff/scantest.xif">
The name fileLoc is case sensitive. The value is the url of the file to be displayed. Due to security restrictions, this file must be located on the same server as the applet.
In addition, there are optional parameters:
name | value | default | description |
PAGE | integer | 1 | applet initially goes to page specified |
ANCHOR | #anchor_name | none | applet initially goes to anchor specified |
FRAME | anything | not defined | puts applet in window outside of browser window |
F_WIDTH | integer | 640 | sets width of the initial frame (ignored if FRAME not defined) |
F_HEIGHT | integer | 480 | sets height of the initial frame (ignored if FRAME not defined) |
So, in order to have the applet display in a 500x500 frame, the html would look like this:
<html> <head> <title>DigiPaper Viewer</title> </head> <body> <h2>The DigiPaper Viewer</h2> <p> <applet code="COM.xerox.digipaper.applet.client.Client" codebase="./" width="640" height="480" archive="client_fullx3.jar"> <param name="fileLoc" value="http://www.cs.cornell.edu/melissa/digipaper/xiff/scantest.xif"> <param name="FRAME" value=yippers> <param name="F_WIDTH" value=500> <param name="F_HEIGHT" value=500> <p> Sorry, the viewer is written in java. <p>
You need a java-enabled browser. </applet> </p> </body> </html>
Note that these names are also case sensitive, and the PARAM tags must come between the <applet> and </applet> tags.