Example-VB | Example-VC++ |
Saves the displayed image page or the entire image document using the fully-qualified name specified.
Ö | Imaging for Windows Professional Edition V1.0, V1.1, and V2.0 |
Ö | Imaging for Windows 98 |
Imaging for Windows 95 | |
Imaging for Windows NT 4.0 |
Image Edit control
object.SavePage Image[,FileType,PageType,CompressionType,CompressionInfo,SaveAtZoom,PageNumber]
Parameter | Data Type | Setting |
Image | String | The fully-qualified name of the image document being saved |
FileType | Integer (enumerated) |
The FileType the image is being saved as |
PageType | Integer (enumerated) |
The PageType the image is being saved as |
CompressionType | Integer (enumerated) |
The CompressionType at which the image is being saved |
CompressionInfo | Integer (enumerated) |
The CompressionInfo setting of the image being saved |
SaveAtZoom | Boolean | Whether the image is being saved using the current or original scale percentage value:
True The image is being saved using the current scale percentage value |
PageNumber | Long | 1 or greater Saves the displayed image page to the name and PageNumber specified -1 Saves all pages in the displayed image document to the name specified. The default is -1. See "Special Note Regarding the PageNumber Parameter" for more information. |
None
The following table describes what occurs when the SavePage method is used to save image page(s) to an existing image document.
PageNumber Value Entered | Image Page(s) to be Saved by the SavePage Method | Action Performed by the SavePage Method on the Existing Image Document |
1 or greater | Image page currently being displayed | Overwrites the image page that corresponds to the value entered in the PageNumber parameter provided the image page exists. If the image page does not exist, appends the displayed image page to the end of the existing image document |
-1 | All image pages in the image document currently being displayed | Overwrites the entire image document; no existing image pages are retained |
The Display method must be invoked prior to calling this method.
You see an error message if you enter a PageNumber value of 0, or a PageNumber value less than -1. You also see an error message if you enter a PageNumber value greater than one when saving to a new image document.
Upon successful completion of the SavePage method, the image display window continues to display the original image; the Image property value remains unchanged. Continuing to display the original image ensures that the image on display is the same as the image specified in the Image property. For example, assume the currently displayed image is payroll.tif and the value of the Image property is also payroll.tif. When the SavePage method is invoked with its Image parameter set to payroll98.tif, the image is saved as payroll98.tif. The image display window continues to display payroll.tif, and the Image property value remains unchanged at payroll.tif.
If a multipage image file (AWD, DCX, TIFF, WIFF, or XIF) is saved as a file type that does not support multipage image files (for example, BMP), only the page currently being displayed is saved to the new file. Note that this restriction does not apply to Imaging 1x documents. The entire document is saved in the original file type except for the displayed image, which is converted.
For the TIFF file type, annotations are saved as annotation data separate from the image data. For all other file types, annotations are lost unless the BurnInAnnotations method is invoked prior to calling the SavePage method. The BurnInAnnotations method burns annotations onto an image, causing them to be permanently incorporated into the image.
In addition, document properties are saved within TIFF images only.
If the FileType parameter is not entered, the SavePage method uses the original FileType setting of the image as a default. If the original FileType setting cannot be determined or is read-only, and the SavePage method is saving to a local drive or file server, the method throws an Invalid File Format error. If the SavePage method is saving to a document server, it saves the image as a TIFF file.
If the PageType and FileType parameters are not entered, the SavePage method uses the original PageType setting of the image as a default. However, if a FileType is entered, the SavePage method uses a PageType default setting that is associated with the FileType setting of the image. The following list describes the default PageType settings:
FileType Setting | Default PageType Setting |
1 TIFF | PageType setting of the displayed image |
2 AWD | 1 Black-and-white |
3 BMP | PageType setting of the displayed image |
Note: AWD is not available with Imaging for Windows NT 4.0.
If the CompressionType parameter is Group3(2D), the SavePage method saves the image using the Group4(2D) compression type. If the CompressionType parameter is LZW, the SavePage method saves the image using no compression.
If the CompressionType parameter is not entered, the SavePage method uses a default CompressionType setting that is associated with the FileType and PageType settings of the image. The following list describes the default CompressionType settings:
FileType Setting | PageType Setting | Default CompressionType Setting |
2 AWD | 1 Black-and-white | 1 No compression |
3 BMP | 1,5,7 All supported PageTypes | 1 No compression |
1 TIFF | 1 Black-and-white | 2 Group3(1D) |
1 TIFF | 2 Gray4 | 1 No compression |
1 TIFF | 3 Gray8 | 1 No compression |
1 TIFF | 4 Palettized4 | 1 No compression |
1 TIFF | 5 Palettized8 | 1 No compression |
1 TIFF | 6 RGB24 | 1 No compression |
Note: To use a PageType setting of 4 (Palettized4), the displayed image must already be a Palettized4 image.
If the CompressionInfo parameter is not entered, the SavePage method uses a default CompressionInfo setting that is associated with the CompressionType setting of the image. The following list describes the default CompressionInfo settings:
CompressionType Setting | CompressionInfo Default Setting |
1 No compression | 0 No compression |
2 Group3(1D) | 8 Compressed LTR, 16 Expand LTR, 1 EOL, and 4 Prefixed EOL |
3 Group3(Modified Huffman) | 8 Compressed LTR and 16 Expand LTR |
4 PackBits | 16 Expand LTR |
5 Group4(2D) | 2 Packed Lines, 8 Compressed LTR, and 16 Expand LTR |
6 JPEG | 1024 Medium Compression/Medium Quality |
9 LZW | 0 No compression |
When a CompressionInfo value of 0 is entered with the CompressionType parameter set to 1 (no compression), the file is saved using no compression.
When a CompressionInfo value of 0 is entered with the CompressionType parameter set to a value other than 1, the file is saved using the default CompressionInfo parameter settings that correspond to the setting of the CompressionType parameter (as explained in the preceding list).
For example, if the end user specifies a CompressionType value of 1 (no compression) and then a CompressionInfo value of 0, the file is saved using no compression. If the end user specifies a CompressionType value of 2 (Group3[1D]) and then a CompressionInfo value of 0, the file is saved using the default CompressionInfo values for Group3(1D):
8 Compressed LTR,
16 Expand LTR,
1 EOL, and
4 Prefixed EOL
If the SaveAtZoom parameter is not specified, the image is saved using the original zoom scale percentage value.
Invoking the SavePage method sets the ImageModified property to False.
You cannot save image documents to Imaging 3.x Servers.
Imaging 1.x and 3.x Server access is available with Imaging for Windows Professional Edition V1.1 and V2.0 only.
The SavePage method does not function when a URL has been entered into the Image property.