Guide for VB.NET
Core Document Formats
Additional Features
Text Annotation

VB.NET Imaging - Create Text Annotation on Image

VB.NET Sample Code to Annotate Image & Document with Text

VB.NET
Home > .NET Imaging SDK > VB.NET > Text Annotating
To get started with DocImage SDK for .NET, you are supposed to read VB.NET Imaging: Get Started first!

VB.NET Text Annotating Control Summary
RasterEdge VB.NET Document Image Annotating SDK provides users the most standard text annotation DLL to draw and specify text annotation markup to any document or image format supported by our Windows and web viewers, including PDF/A, PDF, Word, TIFF, PNG, JPEG, GIF, BMP and more.
Related .net document control helps:
asp.net mvc word viewer: ASP.NET Office Word Document Viewer: view Word doc files online using C# in ASP.NET MVC web applications
c# asp.net text file viewer: ASP.NET Text file viewer in MVC, WebForms: Open, view, annotate, convert txt files in C# ASP.NET
c# asp.net mvc document viewer: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer...
c# asp.net image viewer: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery
asp.net annotate pdf using c#: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#
asp.net mvc excel viewer: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser.
asp.net edit pdf image using c#: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#
What's more, with this text annotation add-on control, users are able to mark revisions, highlight or underline image by creating, customizing, removing and saving text annotation in VB.NET Windows and web applications without affecting the original image and document quality.
This VB.NET text annotation add-on tutorial can be divided into a few sections for a better understanding:
  • General features and benefits list of text annotation creating library in VB imaging application
  • Notice on creating a Windows desktop application to add text annotation with VB programming language
  • How to develop and customize your own text annotation based on RasterEdge VB.NET Text Annotating method
  • Comprehensive and easy to use VB sample code on drawing text annotation object on image and document files
Apart from annotating image and document with text object, RasterEdge .NET Imaging Annotating library can also be used to create other popular annotation notes within VB project, such as: add line annotation markup to single image; draw and remove polygon annotation shape on multiple image files; create and save rubber stamp annotation sticky note on document file, and VB code to create rectangle annotation to source document or image file.
VB.NET Text Annotation Control Benefits Overview
  • Developed in .NET application and written in managed VB code
  • Text font style & color can be easily adjusted using VB.NET code
  • Use VB.NET code to customize the edge property of text annotation
  • Text font, annotation edge, filled shape & shadow property are set separately
  • Text annotation is object-oriented and can be resized & removed easily using VB.NET
  • Created text annotation can be stored as an independent image object using VB.NET
  • Supported image formats contain gif, tiff, png, bmp & jpeg
  • Support draw text annotation on document files in VB.NET, including PDF, TIFF & Word
VB.NET Text Annotation Drawing Windows Project
As this page is designed to show how to add and define text annotation to image and document in VB language Windows imaging application, so our users need to create the compliant VB image text annotating project at first. And this part is an external guide for programming beginners who are new to both VB coding and our .NET Imaging SDK.
To achieve a Windows text annotating program in VB class, you need to make sure that you have installed Microsoft Visual Studio 2005+ and .NET Framework 2.0+ to your computer; then you need to download our VB.NET Imaging Annotating SDK and activate your royalty free developer license and at last you can embed the required "RasterEdge.Imaging.Basic.dll" and "RasterEdge.Imaging.Annotation.dll" assemblies to your created VB Windows project.
And if you are C# developers and want to find the tutorial on adding text image annotation in C#, we suggest you go to: C# image - text annotation add-on and C# image annotating functions summary.
VB.NET Text Annotation Creating Method
Use following image text annotation adding API method in VB class to create and specify text annotation object on image and document within VB Windows application. Furthermore, programmers also can adopt these APIs to work out more advanced and specified text annotating application.
Public Shared Function 
CreateTextAnnotation(x As Single, y As Single, w As Single, h As Single, text As String, font As Font) As TextAnnotation
End Function

Public Shared Function
CreateTextAnnotation(x As Single, y As Single, w As Single, h As Single, text As String, font As Font, _
fontBrush As AnnotationBrush, outline As AnnotationPen, fill As AnnotationBrush, shadow As AnnotationBrush, shadowX As Single, shadowY As Single) As TextAnnotation
End Function
Complete VB.NET Code to Draw Text Annotation
Please refer to following example code in VB class to create, customize, delete and save the text annotation. What's more, with RasterEdge .NET Imaging Saving options, users are able to save the created text annotation as an external annotation file.
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports System.Windows.Forms
Imports RasterEdge.Imaging.Annotation
Imports System.Diagnostics
Imports RasterEdge.Imaging.Annotation.Basic

Namespace annotation_trial
Public Partial Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
End Sub

Private Sub button1_Click(sender As Object, e As EventArgs)

Dim obj As New TextAnnotation()

obj.Text = "This is a Text"
'set the showing text
obj.TextFont = New Font("Arial", 12F, FontStyle.Italic)
'set text font
'set filled font property
obj.FontBrush = New AnnotationBrush()
obj.FontBrush.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
'set filled font style
obj.FontBrush.Solid_Color = Color.DarkBlue
'set filled font color

obj.Padding = 1
'set text padding
' set annotation size
obj.X = 60F
obj.Y = 45F
obj.Width = 250F
obj.Height = 40F

'set annotation edge property
obj.OutLine = New LinePen()
obj.OutLine.Width = 2F
'set edge width
obj.OutLine.Brush = New AnnotationBrush()
obj.OutLine.Brush.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
'set annotation edge style
obj.OutLine.Brush.Solid_Color = Color.White
'set annotation edge color
'set filled shape property
obj.Fill = New AnnotationBrush()
obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
'set filled shapes style
obj.Fill.Solid_Color = Color.Gray
'set filled shapes color
'set shadow property
obj.ShadowFill = New AnnotationBrush()
obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
'set shadow style
obj.ShadowFill.Solid_Color = Color.Blue
'set shadow color
obj.ShadowX = 10F
'set shadow position
obj.ShadowY = 12F
obj.ShowShadow = True
'show shadow or not
Dim folderName As String = "C:/"
Dim img As Bitmap = obj.CreateAnnotation()
img.Save(folderName & "textannotation.png")
End Sub
End Class
End Namespace


Recommend this to Google+


RasterEdge.com is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2017 Raster Edge.com