Method:

Method:

Method Group:

Opening documents and images

openFile(filename, page)

E.g. ViewONE.openFile(“myimages.tif”, 1);

Specifies the filename and initial page of the document to be viewed.

This filename can specify either the filename relative to the code base (as above) or the full URL. The code base is specified in the HTML code for the applet (see previous example). An example of a full URL is as follows…

E.g. ViewONE.openFile(“http://mysite/myimages.tif”, 1);

closeDocument()

E.g. ViewONE.closeDocument();

Closes an open document.

NOTE: Closing the open document also resets annotations, annotation templates and background images.

initializePageArray(numPages) setPageArray(filename, page) openPageArray(page)

E.g.

ViewONE.initializePageArray(3);

ViewONE.setPageArray(“page1.tif”, 0);

ViewONE.setPageArray(“page2.tif”, 1);

ViewONE.setPageArray(“page3.tif”, 2);

ViewONE.openPageArray(1);

This method group specifies the number files (pages) in a list, then specifies each file (each one representing a successive page of the document), then opens the ‘assembled’ document at page 1. Note the page array begins at array element zero.

19

Page 19
Image 19
JAVA Tech VERSION 3.0 manual Opening documents and images, OpenFilefilename, CloseDocument