SaveAnnotations Method

Example-VB Example-VC++

Saves the annotations on the image currently being displayed to a file.

Available With

Ö Imaging for Windows Professional Edition V2.0
Imaging for Windows Professional Edition V1.0 and V1.1
Imaging for Windows 95 and 98
Imaging for Windows NT 4.0

Applies To

Image Edit control

Syntax

object.SaveAnnotations FileName,StartPage,EndPage,Flags

Arguments

Parameter Data Type Setting

FileName String The fully-qualified name of the file the annotations will be saved to
StartPage Long The starting page in the currently displayed file containing the annotations to be saved
EndPage Long The ending page in the currently displayed file containing the annotations to be saved
Flags Long KEEP_ANNOTATIONS Retain the annotations in the currently displayed file

REMOVE_ANNOTATIONS Remove the annotations from the currently displayed file that have been saved to the file specified in the FileName parameter


Return Value

Long

Value Description

0 Failed
1 Success

Remarks

The Display method must be invoked prior to calling this method.

To support StartPage and EndPage parameter entries that span more than one page, the image file on display must be a multipage image file type (AWD or TIFF).

Note: The SaveAnnotations method does not function when a URL has been entered into the Image property.

Notes Regarding the StartPage and EndPage Parameters

If the StartPage parameter is set to 5 and the EndPage parameter is set to 8, the annotations on pages 5, 6, 7 and 8 of the source image file (currently on display) will be saved to the destination file specified in the FileName parameter.

The SaveAnnotations method does not retain the page numbers in the source image file.  Annotations are saved to the destination file corresponding to page numbers that begin with 1.  Continuing the previous example, annotations that appear on pages 5, 6, 7, and 8 in the source file are saved to pages 1, 2, 3, and 4 in the destination file.  If there are no annotations on a page in the source file, a blank page is retained in the destination file.

If there are more annotations than pages, or more pages than annotations, the SaveAnnotations method will perform the best fit it can.