NotateXpress 13 for .NET - User Guide > How To > Annotate Programmatically > Create, Select & Modify Annotations |
Each layer has an associated collection of annotations (elements). Annotations are programmatically added, deleted, selected, and modified by calling methods in the Element and ElementCollection classes.
Annotations are created programmatically by creating an instance of the tool to be applied, setting the tool characteristics, then adding the annotation to the layer.
Prior to annotating, make sure that NotateXpress has a valid associated ImagXpress Client, and that a Layer has been created programmatically, or retrieved from annotation file. |
C# Example |
Copy Code
|
---|---|
// Define the characteristics of the text annotation to be added Accusoft.NotateXpressSdk.TextTool text = new Accusoft.NotateXpressSdk.TextTool(); text.TextJustification = Accusoft.NotateXpressSdk.TextJustification.Center; text.Text = "NotateXpress"; text.BackColor = System.Drawing.Color.Red; text.BoundingRectangle = rect; text.PenWidth = 2; text.BackStyle = Accusoft.NotateXpressSdk.BackStyle.Translucent; text.PenWidth = 2; // Add a text annotation to the layer layer.Elements.Add(text); |
Bates Stamping is used in the legal and business fields to sequentially number or date/time mark images or documents as they are scanned or processed.
Bates Stamping can be used to mark and identify images with copyrights by putting a company name, logo and/or legal copyright on them. This process provides identification, protection, and auto-increment numbering of the images.
Manual Bates Stamping used a stamp that incremented a sequential number each time it was pressed down on a document. Accusoft suggests using a NotateXpress stamp to automate this function. The developer needs to create a stamptool at a specific location on the document then set the text field with an appropriate string. Branding the stamp onto the document is considered optional.
Once an annotation has been added to a layer, it is available to be selected, modified, or deleted as part of the layer's element collection.
The Z-order of annotations on a layer can be modified using the Element and ElementCollection methods:
Nudge Up - The NudgeUp method moves the specified annotation object one level up (towards the front) in the painting order. Use this to display the moved element "in front of" or "on top of" other annotation objects that may overlap this one.
Nudge Down - The NudgeDn method moves the specified annotation object one level down (towards the back) in the painting order. Use this to display the moved element "behind" or "under" other annotation objects that may overlap this one.
Reverse - To reverse the visual z-order of all the annotations on the layer, call the Reverse method.
Send to Back - To send elements to the back of the display order, call SendToBack
Bring to Front - To bring elements to the front of the display order call BringToFront.