Click or drag to resize

DocumentAnnotationViewerLoadAnnotationData Method

Loads annotation data into the viewer for the specified page.

Namespace:  Atalasoft.Annotate.UI
Assembly:  Atalasoft.dotImage.WinControls (in Atalasoft.dotImage.WinControls.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public void LoadAnnotationData(
	Stream stream,
	int frameIndex,
	IFormatter annotationDataFormatter,
	bool overwriteExistingAnnotations
)

Parameters

stream
Type: System.IOStream
A stream containing the annotation data.
frameIndex
Type: SystemInt32
The index of the page the data will be loaded into. Pass -1 to load data for all pages. If a specific frame is specified, the annotation data must contain only one layer or have enough layers that frameIndex is a valid layer index.
annotationDataFormatter
Type: System.Runtime.SerializationIFormatter
The formatter used to read the annotation data from the stream.
overwriteExistingAnnotations
Type: SystemBoolean
True to replace any existing annotations with those being loaded. If false, the annotations will be inserted into the existing layer.
Exceptions
ExceptionCondition
InvalidOperationException Thrown if there are no images loaded.
ArgumentNullException Thrown if the stream is null (Nothing in VB).
ArgumentException Thrown if the stream does not have read access.
ArgumentOutOfRangeException Thrown if the frame index is invalid.
See Also