Accusoft.NotateXpress13.Net
Save Annotations to File, Array, or Stream

To save annotations to a file, array, or stream, first specify SaveOptions to provide specific instructions for saving the annotations. 

Specifying Save Options

Prior to storing the annotations, first specify SaveOptions to provide specific saving instructions. 

C# Example
Copy Code
// save all annotation layers
mysaveOptions.AllLayers = true;
// as NotateXpress annotations
mysaveOptions.AnnType = AnnotationType.NotateXpress;
// provide some information about the annotations
notateXpress1.Layers.Comments = "This file was saved today";
notateXpress1.Layers.Subject = "my annotations";
notateXpress1.Layers.Title = "One awesome annotation file";

Storing to a Disk File

Use the LayerCollection.SaveToFile method to save the layer collection to an annotation file: 

C# Example
Copy Code
// store to a .nxp annotation file
notateXpress1.Layers.SaveToFile(myFileName, mysaveOptions);

NXP annotations files on disk can only be read if they were originally created using SaveToFile().  If they were created using SaveToByteArray() or SaveToMemoryStream(), they cannot be read correctly from disk.

Storing to a Byte Array

Use the LayerCollection.SaveToByteArray to save annotations to a byte array: 

C# Example
Copy Code
// store to a byte array
mybytearray = notateXpress1.Layers.SaveToByteArray(mysaveOptions);

Storing to Memory Stream

Use the LayerCollection.SaveToMemoryStream to save annotations to a memory stream: 

C# Example
Copy Code
// store to a byte array
mymemorystream = notateXpress1.Layers.SaveToMemoryStream(mysaveOptions);

Storing to a Layer Collection

A layer collection can also be copied to another layer collection as follows: 

C# Example
Copy Code
//copy the layers from one notateXpress control to another
Notatexpress1.Layers = NotateXpress2.Layers;

 

See Also

 

 


©2019. Accusoft Corporation. All Rights Reserved.

Send Feedback