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

Page 27
Image 27
JAVA Tech VERSION 3.0 manual Saving documents and images, Savefilename, SavePagefilename, MethodsaveSelectedfilename