JAVA Tech VERSION 3.0 manual ViewONE Pro, Mayscript parameter, Apple Macintosh users JavaScript

Page 10

ViewONE Pro

If you have downloaded ViewONE Pro (with or without the Print Accelerator, Annotations, DjVu, PDF or other optional modules), then to use ViewONE Pro on your web site, setup a web page containing the following HTML…

<APPLET CODEBASE = “.”

ARCHIVE = “ViewONE.jar” CODE = “start.jiViewONE.class” NAME = “ViewONE”

WIDTH = “100%”

HEIGHT = “97%” HSPACE = “0” VSPACE = “0” ALIGN = “middle” MAYSCRIPT=”true”>

<PARAM NAME=“cabbase” VALUE=“ViewONE.cab”> </APPLET>

In each case, you must change the “codebase” value to point to the location of the ‘v1files’ directory that contains ViewONEs resource files (i.e. ji.jar, ji.cab and other .v1 files).

The codebase parameter specifies the location of the ji.jar, ji.cab and other files relative to the location of the HTML page. So in this case it specifies the “current directory” which is “.”

(Note: PARAM NAME=cabbase” is required for Microsoft Explorer users).

Our downloadable demos include examples to assist you.

Mayscript parameter

When using JavaScript it is important to include the MAYSCRIPT parameter (see both HTML samples above). This parameter is an enabler for the JavaScript interface. Without it, calls to JavaScript will not work.

Apple Macintosh users (JavaScript)

Depending on the version of the operating system used by Apple Macintosh computers, JavaScript may or may not operate correctly.

Apple MacOS 8 and 9 computers utilize Apples Java engine known as MRJ (Macintosh Runtime Java). This particular Java engine did not have full support for JavaScript to Java Applets and so the JavaScript API will not operate with MRJ.

Apple MacOS X (10.x) computers utilize Apples updated Java 2 engine which does include support for JavaScript to Java API’s.

10

Image 10
Contents ViewONE JavaScript API Manual Contents Specifying an Annotations File Viewing Toolbars and Buttons Timeout/User Idle Control Introduction Applet user interface Installing ViewONE ViewONE StandardMayscript parameter ViewONE ProApple Macintosh users JavaScript Using ViewONE Standard on IE for Apple Macintosh Apple Macintosh users HtmlSetting up Windows 2003 server Page Page ViewONE JavaScript Overview JavaScript Reference General Applet Control Method isReadyMethod getVersion CloseDocument Opening documents and imagesOpenFilefilename, ViewONE.closeDocument Closes an open documentPage Method Group Method openListlistFile, NextDoc PrevDoc FirstDoc LastDoc GetDocIndex GetNumDocs ReloadListOpenDocindex MethodgetNumPagesMethod nextPage MethodsetPagepageMethod getPage Method previousPageMethodgetDocReference Method getCacheFileSpecifying an Annotations File MethodsetAnnotationFilefilenameSavePagefilename Saving documents and imagesSavefilename MethodsaveSelectedfilenameMethodisMultipageTif SetHyperlinkurl, dblClick Document hyperlinksClearHyperlink Method Pro-Only Method Pro-Only Method Cold Viewing Options Pro-Only SetBackgroundImagefilename, pageNumber SetBackgroundImageEnabledtrue/false IsBackgroundImageEnabledDocument Indexes Pro-Only SetIndexListFileURLSetInvertedtrue/false ImageInvert IsInvertedGetEnhanceMode IsEnhancetrue/falseSetEnhanceModemode SetRotationangleMethod applyRotationArray Method initializeRotationArrayint sizeMethod setRotationArrayint angle, int Method getRotationRotate180 MethodrotateClockwiseMethod rotateCounterclockwise SetFlipmodeGetScale GetFlipSetScalescale GetStatesMethod zoomOut ViewONE.zoom100 Zooms image to 100% full resolutionMethod setStatesstring states Method zoom100Method zoomAreax, y, width, height, highlight, seconds Method setZoomzoomMethod setZoomAndXYScrollzoom, x, y SetXYScrollx, yMethod resetBrightness Method setDraggingEnabledtrue/falseMethod isDraggingEnabled Method setBrightnesspercentMethod setContrastpercent Method resetContrastMethod getBrightness Method getContrastMethod getLuminance Method resetLuminanceMethod setLuminancepercent Method getImageWidthMethod getYResolution Method getXResolutionGetImageHeight SetViewview ViewingGetView ToggleAreaZoom SetAreaZoomtrue/falseIsAreaZoom Method setMagnifiertrue/falseMethod setMagnifierInternaltrue/false SetMagFactor IsMagnifierToggleMagnifier Method getMagFactorSetImageForeColorcolor IsNewWindowVisibleShowImageForeColorDialog SetImageBackColorcolor ShowImageBackColorDialogLabels Method clearSelections Selection and clipboardMethod selectPageint pageNumber Method copyPageToClipboardPrintDocument PrintingPrintPage PrintRangePrintTransformed PrintSelectedPrintVisible SetPrintDialogtrue/falseMethod setPrintCopiesinteger Method isPrintDialogMethod setPrinterstring Method setPrintHeaderheaderString Or some other informational textMethod setPrintAutoRotate true/false IsScrollbars Toolbars and ButtonsMethod setScrollbarstrue/false SetStatusBartrue/falseMethod setFileButtonstrue/false Method isFileButtonsIsImageButtons Method setImageButtonstrue/falseSetPrintButtonstrue/false IsInvertButtons Method isPrintButtonsSetInvertButtonstrue/false Method setNewWindowButtonstrue/falseMethod isViewButtons IsNewWindowButtonsSetViewButtonstrue/false Method setAllButtonstrue/falseMethodsetPageButtonstrue/false Method isAllButtonsMethod isPageButtons SetAdjustToolVisibleOnOff ToggleAdjustToolIsAdjustToolVisible IsFileMenus Menus and keysSetFileMenustrue/false ViewONE.setFileMenustrueIsViewMenus SetViewMenustrue/falseViewONE.setViewMenustrue IsImageMenus SetImageMenustrue/falseViewONE.setImageMenustrue IsPrintMenus SetPrintMenustrue/falseViewONE.setPrintMenustrue IsPageMenus SetPageMenustrue/falseViewONE.setPageMenustrue IsSelectMenus SetSelectMenustrue/falseViewONE.setSelectMenustrue IsPreferenceMenus SetPreferenceMenustrue/falseViewONE.setPreferenceMenustrue SetFileKeystrue/false SetAllMenustrue/falseIsAllMenus IsFileKeysSetImageKeystrue/false IsImageKeysIsPrintKeys SetPrintKeystrue/falseSetViewKeystrue/false IsPageKeys IsViewKeysSetPageKeystrue/false SetSelectKeystrue/falseMethod setAllKeystrue/false Method isSelectKeysMethod isAllKeys Method getTimeout Timeout/User Idle ControlMethod setTimeoutseconds Method stopTimeoutMethod getTimeLeft Event Handler and Event Handling Events handler change in ViewONE Version Events ids and descriptions DocN Html tag is used see Html manual End tabReady First time the page is viewed Event Handler example HSPACE=0 VSPACE=0Testing your Event Handler MayScript tag