Visual C#.NET: Annotate, Redact Document & Images

How to annotate, redact document image using C#.NET
Yiigo.Image for .NET provides advanced annotation support, allowing developers to use many annotation objects onto documents and images in bitonal, color and grayscale. Find more annotation information on Yiigo.Imaging for .NET Annotation Support.
Yiigo.Image for .NET Annotation SDK has those following functionalities:
  • Multiple Annotation Types: ellipse, rectangle, rounded rectangle, metafile, stamp, rubber stamp, freehand etc.
  • Add, remove, group, resize, rotate, and select annotation
  • Make annotation visible or invisible
  • Save or load annotations as a separate XML
  • Save or load annotations embedded in a TIFF, JPEG, or PDF image
This document provides comprehensive Visual C#.NET samples for guiding developers to create, add, delete, remove and customize annotation on documents and images using Yiigo.Image for .NET. Find more annotation tutorials on VB.NET Annotation, Web Imaging Viewer Annotation Support and Annotate in .NET Winforms.
.NET Annoation with C#.NET Sample Code

Requirements

Before install Yiigo.Image for .NET in Visual C#.NET, make sure that you have installed.
  • Operating systems - Windows 7, Windows Vista, and Windows XP, etc
  • Compatible with .NET framework 2.0 and above versions
  • Support Visual Studio 2005, 2010 and other .NET development environments
  • Yiigo.Image for .NET installation

Start to Annotate

  • Open and run your Microsoft Visual Studio;
  • Choose either "Visual C# Projects" in "New Project" dialog box;
  • Choose "Windows Application" in the "Templates" List and name it "YiigoImagingAnnoatationCsharp";
  • Right-click on the "References" folder, and select "Add Reference..." from the context menu in the "Solution Explorer" window;
  • In the "Add Reference" dialog box, select the ".NET" tab and browse to Yiigo.Imaging.Net.dll library;
  • Add it to your Visual C# applications;
  • Call Yiigo .NET Image Namespace & Copy those following codes:
using System.IO;
using System.Drawing.Printing;
using Yiigo.Imaging;
using Yiigo.Imaging.Processing;
using Yiigo.Imaging.Annotation;

// Create Annotation
YiigoAnnotation Annotation = new YiigoAnnotation();
Annotation.Type = YiigoAnnotation.Type.Text;
Annotation.TextData = "Yiigo";
Annotation.TextFont = New Font ("Arial", 10f, FontStyle. Regular);
Annotation.BackgroundColor = Color.Red;
Annotation.ShadowOffset = new PointF(2, 2);
Annotation.Data.CanRotate = false;
AnnotationController1.CreateAnnotation(Annotation);

// Add Annotations programmatically
Annotation.Text = "Yiigo";
AnnotationController1.CurrentLayer.Items.Add(Annotation);

// Print Annotation
PrintDialog myPrintDialog = new PrintDialog();
AnnotationPrintDocument AnnotationPrint = new AnnotationPrintDocument();
myPrintDialog.Document = AnnotationPrint;
if (myPrintDialog.ShowDialog(this) == DialogResult.OK)
{
AnnotationPrint.Image = this.Viewer.Image;
AnnotationPrint.Annotations = this.Viewer.Annotations;
AnnotationPrint.Print();
}

How to Annotate an Image C#

Products
Other Plugins
Image Viewer CoreBarcode PluginPDF Read & WriteTesseract OCR PluginForm Processing PluginJBIG2 CodecJPEG2000 CodecISIS ScannerTwain ScannerDICOM ReaderCAD Scanner