EdgeDoc
Features
Tech Specs
How-to C#
Pricing
ASP.NET Annotate Document
  |  
Home ›› ASP.NET Document Viewer ›› C#: ASP.NET Document Viewer ›› C# ASP.NET Annotate Document Online

ASP.NET Document Annotation: Setting text comment, drawings on documents in ASP.NET


How to set text commenting, drawings on documents using ASP.NET Document Annotation component.






RasterEdge XDoc.HTML5 Viewer library provides C# programmers with various kinds of annotation buttons on toolbar. By creating, loading, and modifying annotations, you can collaborate with your colleagues and peers on the same document file.




Annotation Default Setting



As you see, in our online C#.NET web viewer demo, you can dynamically change the style of annotation via user interface of HTML5 document viewer. When an annotation is selected, corresponding style icon will appear clickable state. You may click on corresponding icon to change annotation property.


In addition, RasterEdge web viewer library allows C# developers to customize the default style of annotations. It is simple and straightforward. Directly copy and modify the following properties in your Default.aspx file. The code example below illustrates the default setting for text annotation. You can change FillColor:”#FFFFFF” to FillColor:”#FF0000” and the background color of text annotation will be changed to red.




// Define annotation style.
_tabAnnotations.addCommand(new CommandAnnotation("text",
	new AnnoStyle({OutLineWidth:3.0,OutLineColor:"#FFFFFF",FillColor: "#FFFFFF",
TextColor: "#000000", TextFont: "Arial", TextSize: 18,TextStyle :"bold",Transparency:0.8})));





Loading and Saving Annotation in Viewer



There are two ways to save annotations in your C# web viewer application. One is to save annotations separately from original document as xml files. You can load the saved xml annotations next time you view the same document. Another way is to burn annotations into original document as native graphics.