JAVA Tech VERSION 3.0 manual Method setPrintHeaderheaderString, Or some other informational text

Page 59

Method: setPrintHeader(headerString)

E.g. ViewONE.setPrintHeader(“$page # $of ##”)

Printouts can include custom text at the top of each page. By default this text is set to the page number followed by the number of pages in the document. The following options are available…

“false”

: This value will disable print headers

“any text”

: This is the text that will appear at the top of each printed page. For

 

example, it could be your own copyright for the documents being viewed

 

or some other informational text.

“formatted text” : The text can include some limited formatted elements as follows:

$page : This will print the word “page” in the appropriate translation

$of

: Similarly for the word “of”

$pages: Similarly for the word “pages”

#: This will print the page number of the page being printed

## : This will print the number of pages in the document

An example…

“$page # $of ## Copyright blah 2000”

Note 1: The default value is: “($page # $of ##)”

Note 2: Print headers are available for Internet Explorer 4.01+, Netscape 4.06+ and the Java Plugin 1.3 (The Java Plugin 1.2.2 does not offer sufficient functionality to permit print headers and so they will not be seen if using this version of the plugin).

Security note: This method is disabled by default unless the “JavascriptExtensions” parameter is set to “true”.

59

Image 59
Contents ViewONE JavaScript API Manual Contents Specifying an Annotations File Viewing Toolbars and Buttons Timeout/User Idle Control Introduction Applet user interface ViewONE Standard Installing ViewONEApple Macintosh users JavaScript ViewONE ProMayscript parameter Apple Macintosh users Html Using ViewONE Standard on IE for Apple MacintoshSetting up Windows 2003 server Page Page ViewONE JavaScript Overview JavaScript Reference Method isReady General Applet ControlMethod getVersion ViewONE.closeDocument Closes an open document Opening documents and imagesOpenFilefilename, CloseDocumentPage Method Group Method openListlistFile, MethodgetNumPages ReloadListOpenDocindex NextDoc PrevDoc FirstDoc LastDoc GetDocIndex GetNumDocsMethod previousPage MethodsetPagepageMethod getPage Method nextPageMethod getCacheFile MethodgetDocReferenceMethodsetAnnotationFilefilename Specifying an Annotations FileMethodsaveSelectedfilename Saving documents and imagesSavefilename SavePagefilenameMethodisMultipageTif ClearHyperlink Document hyperlinksSetHyperlinkurl, dblClick Method Pro-Only Method Pro-Only Method Cold Viewing Options Pro-Only SetBackgroundImagefilename, pageNumber IsBackgroundImageEnabled SetBackgroundImageEnabledtrue/falseSetIndexListFileURL Document Indexes Pro-OnlyIsInverted ImageInvert SetInvertedtrue/falseSetRotationangle IsEnhancetrue/falseSetEnhanceModemode GetEnhanceModeMethod getRotation Method initializeRotationArrayint sizeMethod setRotationArrayint angle, int Method applyRotationArraySetFlipmode MethodrotateClockwiseMethod rotateCounterclockwise Rotate180GetStates GetFlipSetScalescale GetScaleMethod zoom100 ViewONE.zoom100 Zooms image to 100% full resolutionMethod setStatesstring states Method zoomOutSetXYScrollx, y Method setZoomzoomMethod setZoomAndXYScrollzoom, x, y Method zoomAreax, y, width, height, highlight, secondsMethod setBrightnesspercent Method setDraggingEnabledtrue/falseMethod isDraggingEnabled Method resetBrightnessMethod getContrast Method resetContrastMethod getBrightness Method setContrastpercentMethod getImageWidth Method resetLuminanceMethod setLuminancepercent Method getLuminanceGetImageHeight Method getXResolutionMethod getYResolution GetView ViewingSetViewview Method setMagnifiertrue/false SetAreaZoomtrue/falseIsAreaZoom ToggleAreaZoomMethod setMagnifierInternaltrue/false Method getMagFactor IsMagnifierToggleMagnifier SetMagFactorShowImageForeColorDialog IsNewWindowVisibleSetImageForeColorcolor ShowImageBackColorDialog SetImageBackColorcolorLabels Method copyPageToClipboard Selection and clipboardMethod selectPageint pageNumber Method clearSelectionsPrintRange PrintingPrintPage PrintDocumentSetPrintDialogtrue/false PrintSelectedPrintVisible PrintTransformedMethod setPrinterstring Method isPrintDialogMethod setPrintCopiesinteger Or some other informational text Method setPrintHeaderheaderStringMethod setPrintAutoRotate true/false SetStatusBartrue/false Toolbars and ButtonsMethod setScrollbarstrue/false IsScrollbarsMethod isFileButtons Method setFileButtonstrue/falseSetPrintButtonstrue/false Method setImageButtonstrue/falseIsImageButtons Method setNewWindowButtonstrue/false Method isPrintButtonsSetInvertButtonstrue/false IsInvertButtonsMethod setAllButtonstrue/false IsNewWindowButtonsSetViewButtonstrue/false Method isViewButtonsMethod isPageButtons Method isAllButtonsMethodsetPageButtonstrue/false IsAdjustToolVisible ToggleAdjustToolSetAdjustToolVisibleOnOff ViewONE.setFileMenustrue Menus and keysSetFileMenustrue/false IsFileMenusViewONE.setViewMenustrue SetViewMenustrue/falseIsViewMenus ViewONE.setImageMenustrue SetImageMenustrue/falseIsImageMenus ViewONE.setPrintMenustrue SetPrintMenustrue/falseIsPrintMenus ViewONE.setPageMenustrue SetPageMenustrue/falseIsPageMenus ViewONE.setSelectMenustrue SetSelectMenustrue/falseIsSelectMenus ViewONE.setPreferenceMenustrue SetPreferenceMenustrue/falseIsPreferenceMenus IsFileKeys SetAllMenustrue/falseIsAllMenus SetFileKeystrue/falseIsImageKeys SetImageKeystrue/falseSetViewKeystrue/false SetPrintKeystrue/falseIsPrintKeys SetSelectKeystrue/false IsViewKeysSetPageKeystrue/false IsPageKeysMethod isAllKeys Method isSelectKeysMethod setAllKeystrue/false Method stopTimeout Timeout/User Idle ControlMethod setTimeoutseconds Method getTimeoutMethod getTimeLeft Event Handler and Event Handling Events handler change in ViewONE Version DocN Html tag is used see Html manual End tab Events ids and descriptionsReady First time the page is viewed HSPACE=0 VSPACE=0 Event Handler exampleMayScript tag Testing your Event Handler