JAVA Tech VERSION 3.0 manual Saving documents and images, Savefilename, SavePagefilename

Page 27

Saving documents and images

Method:

Method:

save(filename)

E.g. ViewONE.save(“c:/temp/image.tif”);

Saves the current document (multi-page tiffs), or current page (multi-file documents) to the specified filename.

If filename is null, either the save dialog is displayed or, if a server side save component has been specified, the image is sent to the server side component.

Note: The save operation does not recreate the source file, it merely copies the source file to the specified destination and renames it to the specified filename.

savePage(filename)

E.g. ViewONE.savePage(“c:/temp/page.tif”);

Saves the current page to the specified filename.

If filename is null, either the save dialog is displayed or, if a server side save component has been specified, the image is sent to the server side component.

If the document is a multi-page tif then this method will extract the current page from the source tif file, and create a new tif file containing only the current page.

Method:saveSelected(filename)

E.g. ViewONE.saveSelected(“c:/temp/selected.tif”);

Saves the current selected pages of a multi-page tif document.

If filename is null, either the save dialog is displayed or, if a server side save component has been specified, the image is sent to the server side component.

Note: this method is for use only with multi-page tif documents. If you are viewing a multi- file document then it is not possible to save selected pages from that document except by individually calling the savePage() method for each page that you want to save. You may find isMultipageTif() and getSelected() methods useful to call before calling this method.

27

Image 27
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 ViewONEViewONE Pro Mayscript parameterApple Macintosh users JavaScript 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 Document hyperlinks SetHyperlinkurl, dblClickClearHyperlink 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 getLuminanceMethod getXResolution Method getYResolutionGetImageHeight Viewing SetViewviewGetView Method setMagnifiertrue/false SetAreaZoomtrue/falseIsAreaZoom ToggleAreaZoomMethod setMagnifierInternaltrue/false Method getMagFactor IsMagnifierToggleMagnifier SetMagFactorIsNewWindowVisible SetImageForeColorcolorShowImageForeColorDialog ShowImageBackColorDialog SetImageBackColorcolorLabels Method copyPageToClipboard Selection and clipboardMethod selectPageint pageNumber Method clearSelectionsPrintRange PrintingPrintPage PrintDocumentSetPrintDialogtrue/false PrintSelectedPrintVisible PrintTransformedMethod isPrintDialog Method setPrintCopiesintegerMethod setPrinterstring Or some other informational text Method setPrintHeaderheaderStringMethod setPrintAutoRotate true/false SetStatusBartrue/false Toolbars and ButtonsMethod setScrollbarstrue/false IsScrollbarsMethod isFileButtons Method setFileButtonstrue/falseMethod setImageButtonstrue/false IsImageButtonsSetPrintButtonstrue/false Method setNewWindowButtonstrue/false Method isPrintButtonsSetInvertButtonstrue/false IsInvertButtonsMethod setAllButtonstrue/false IsNewWindowButtonsSetViewButtonstrue/false Method isViewButtonsMethod isAllButtons MethodsetPageButtonstrue/falseMethod isPageButtons ToggleAdjustTool SetAdjustToolVisibleOnOffIsAdjustToolVisible ViewONE.setFileMenustrue Menus and keysSetFileMenustrue/false IsFileMenusSetViewMenustrue/false IsViewMenusViewONE.setViewMenustrue SetImageMenustrue/false IsImageMenusViewONE.setImageMenustrue SetPrintMenustrue/false IsPrintMenusViewONE.setPrintMenustrue SetPageMenustrue/false IsPageMenusViewONE.setPageMenustrue SetSelectMenustrue/false IsSelectMenusViewONE.setSelectMenustrue SetPreferenceMenustrue/false IsPreferenceMenusViewONE.setPreferenceMenustrue IsFileKeys SetAllMenustrue/falseIsAllMenus SetFileKeystrue/falseIsImageKeys SetImageKeystrue/falseSetPrintKeystrue/false IsPrintKeysSetViewKeystrue/false SetSelectKeystrue/false IsViewKeysSetPageKeystrue/false IsPageKeysMethod isSelectKeys Method setAllKeystrue/falseMethod isAllKeys 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