ProjectWonderlandPDFViewerAdmin < Javadesktop < TWiki

TWiki . Javadesktop . ProjectWonderlandPDFViewerAdmin

Home | Changes | Index | Search | Go

PDF Viewer Administration


Summary

Adding a PDF Viewer to your world

The pdf viewer application is loaded into Wonderland using WFS. A sample WFS property file is provided in the wonderland-modules project on java.net:

https://wonderland-modules.dev.java.net/source/browse/*checkout*/wonderland-modules/trunk/src/modules/apps/2d/pdfviewer/PDFViewer-wlc.xml?content-type=text%2Fplain

To install the PDF Viewer, copy the WFS property file to the WFS directory on your Wonderland server. For example, to install the viewer in the default Wonderland MPK20 world, copy PDFViewer-wlc.xml to lg3d-wonderland/src/worlds/default-wfs/building-wld/DemoFloor-wld. The default property file loads the viewer at the starting point in the world. It should appear in front of your avatar when you enter the world.

Next, edit the file and change the path to the PDF document:

<void property="document">                         
    <string>http://research.sun.com/projects/mc/OH07MPK20-revised.pdf</string>
</void> 

Note: The URL must be accessible to all clients, so file:// URLs will not generally work.

The size of the application is specified by the following properties:

<void property="preferredWidth">
    <int>1024</int>
</void> 
<void property="preferredHeight">
    <int>768</int>
</void> 

These are preferred values; the PDF Viewer will stretch the document to fit the specified width. If preferredHeight is too small to display the entire page, the document can be scrolled by click-dragging.

Once you've installed the file in the WFS directory, restart the Wonderland server, or use the Wonderland Manager application to reload WFS.

Deployment Tips

Things to be aware of when deploying the PDF Viewer application.

Application Properties

The PDF Viewer can be pre-configured by setting the following properties in the WFS property file:

Property Type Description Default Required?
document string the URL of the PDF document http://research.sun.com/projects/mc/OH07MPK20-revised.pdf Y
slideShow boolean whether to run in slide show mode false N
startPage int the first page of the slide show 1 N
endPage int the last page of the slide show 0 == last page of document N
showDuration int how long to show a page in slide show mode (milliseconds) 5000 N
showCount int number of times to loop the slide show infinite N
synced boolean whether to sync with other clients true N
preferredWidth double the preferred width in pixels 1024 N
preferredHeight double the preferred height in pixels 768 N
decorated boolean whether to display a border around the application true N

----- Revision r1 - 03 Jul 2008 - 19:06:23 - Main.nsimpson