Q: How can I configure the sample applet PDFWebNotes that Qoppa provides as a sample in the
webnotes.jar?
A: You can configure the applet through a config.xml file by adding it to the applet parameter tag of the HTML:
Config:"config.xml"
See a
live applet using the config.xml file. You can right-click and choose "View Page Source" to view the source of the HTML applet.
Key: XML elements in bold, XML attributes in non-bold
italics.
·
QConfig
– Root Element
o
Toolbar
– Toolbar options
§
AddTextStamp
– Add a button to the annotation toolbar to start a rubber stamp annotation
created from text
·
Icon URL
to the icon to use for the button on the toolbar
· Text – The
text to use in the stamp
·
Color –
The color of the text and border in hexadecimal, for instance
#FF0000 for red
·
Sticky –
(true | false) – Flag indicating if this tools should be sticky
·
Scale – Number indicating the scale for instance 50 for 50%
§
AddImageStamp
– Add a button to the annotation toolbar to start a rubber stamp annotation created
from an image
·
Icon - URL
to the icon to use for for the button on the toolbar
·
Image –
URL to the image to use for the rubber stamp
·
Sticky -
(true | false) – Flag indicating if this tools should be sticky
·
Scale – Number indicating the scale for instance 50 for 50%
§
AddSeparator
– Add a separator to the annotations toolbar
§
RubberStamps
– Configure the Rubber Stamps drop down menu
·
AddTextStamp
– Add an entry to the rubber stamp drop down menu to start a rubber stamp
annotation created from text
See above for options
·
AddImageStamp
– Add a button to the annotation toolbar to start a rubber stamp annotation
created from an image
See above for options
·
RemoveStamp
– Remove one of the standard rubber stamps, using the rubber stamp title
o
Title
– The title of the rubber stamp in the default drop down menu.
·
AddSeparator
– Add a separator to the rubber stamp drop down menu
§
RemoveButton
– Remove a button from any of the toolbars
·
MethodName – The name of the method in one of
the annotation toolbar classes to call to get the button in the toolbar. The applet will then call that buttons setVisible() method to hide the button.
i.e. getjbAttachFile
o
Save
– Save Options
§
SaveURL – The
URL of the script to send the PDF content to when the user clicks on the Save
button. This URL should point to a
script that will receive a multi-part POST message with the file contents in
it.
§
SaveFormat
– (PDF | FDF | XFDF) - The format to use in saving. Use this attribute to save only the
annotations to the server, instead of the full document.
§
SaveFileName
– Use this name as the file name when saving the file.
§
SetCFSession
– (true | false) – Set the ColdFusion session ID as part of the POST
message when saving a file back to the server.
If this variable is set to true, then the HTML should include two parameters:
CFID – The ColdFusion session ID
CFTOKEN – The ColdFusion Token
§
SetJavaSession
– (true | false) – Set the Java session ID as part of the POST message when
saving a file back to the server.
If this variable is set to true, then the HTML should include an additional
parameter:
JSESSIONID – The Java session ID.
o
Key –
Set the key. The contents of this
element will be used to call the setKey() method in the PDFNotesBean.
o
Open
– Open files on startup
§
PDFURL – URL
to the PDF document to load.
·
MergeFDF
– URL to an FDF file to merge into the PDF at load time.
·
LockAnnotations
– If present, lock the current annotations so that they cannot be modified.
o
Notes
– Notes options
§
NewNotesLayer
– If present, jPDFNotes will create a new layer and insert all new
annotations into this layer.
·
LayerName – Name of the new layer.
§
SaveNewOnly
– If present, jPDFNotes will only save new annotations when saving the
document.
§
EnableLayerExport
– If present, jPDFNotes will display an “Export Layer” menu when the user
right clicks on a layer in the layer list.
·
ExportURL
– The URL to send the annotation information when a layer is exported.
Contact us if you need help setting up your config.xml file.