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

VB.NET TIFF - Use VB to Annotate TIFF File

Provide a Solution for Annotating TIFF Document with VB Code

VB.NET
Home > .NET Imaging SDK > VB.NET > TIFF Annotation

"This online guide content is Out Dated!
    Please get the latest XDoc.Tiff C# Developer Guide here.
"

When you are going to install and apply a TIFF image annotator to comment, highlight or note your image content or when you need to combine the annotation along with the TIFF image and merge them into one image that can be output as a PDF or any other image format, what kind of annotation tool will you consider? Now, there is no need to hesitate, because we will offer you the most preeminent TIFF image annotator - RasterEdge VB.NET TIFF Image Annotating Control. And if you have any of the following questions, please do read this tutorial carefully.
Related .net document control helps:
asp.net mvc text file viewer: ASP.NET Text file viewer in MVC, WebForms: Open, view, annotate, convert txt files in C# ASP.NET
mvc pdf editor: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
document viewer asp.net c#: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer...
asp.net pdf editor control: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
asp.net excel view: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser.
asp.net dicom viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
asp.net edit pdf image control: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#
  • What are the practical applications of TIFF image annotator within .NET Framework, like VB.NET project?
  • How many annotating graphics are compatible with this VB.NET TIFF annotating control?
  • What kind of developing environments and operating systems are demanded?
  • How to annotate TIFF image with any supporting annotation shape within VB.NET program?
Overview
This powerful VB.NET TIFF annotation SDK has the functionality that enables users to add annotation, drawing, signature, stamp or sticky note to a TIFF document using VB.NET code in a shorter timeframe. Users are also able to create and edit your own annotation object, merge and combine annotation with image, as well as delete and save annotation made on the TIFF document in an easy way through VB.NET programming.
Besides, this TIFF annotation program is the fully-managed .NET annotating library that guarantees annotation wok in many written .NET applications, like Visual Basic .NET, Visual C#.NET, ASP.NET and .NET Windows Forms.
Supporting Types
This VB.NET TIFF annotating plug-in guarantees more than ten kinds of annotation symbols, such as line - drawing a line, lines - drawing multiline, freehand - adding a freehand line, rectangle - creating a rectangle, polygon - drawing a polygon, embedded image - inserting an image from local or internal image source, text - creating a text, and so on so forth.
Developing Demands
In this part, we will illustrate requirements of using our TIFF annotation control for VB.NET on Windows OS, .NET Framework, Microsoft Visual Studio and browser.
  • Windows 2000 / XP / 7 or Windows Server 2000 / 2003 / 2008
  • .NET Framework 2.0 / 3.0 / 3.5 / 4.0 / 4.5
  • Microsoft Visual Studio 2005 / 2008 / 2010 / 2012
  • Internet Explorers, Chrome, Firefox, Safari, etc.
How to
We will teach users to add and insert annotation to TIFF file from following two sections: one is entire TIFF annotation methods and the other is the whole VB codes for over 10 annotations adding.

How to - APIs

Please refer to the following image annotation creating APIs and methods. You are allowed to apply them into your VB.NET project and do some customization.
Add any compatible annotation object to TIFF file in VB.NET.
Private Function AddFloatingItem(item As BaseItem) As Integer Implements TIFFPage.AddFloatingItem
End Function
Merge and burn the added annotation to the loaded TIFF page in VB.NET.
Private Sub MergeItemsToPage() Implements TIFFPage.MergeItemsToPage
End Sub

How to - Codes

Please embed the required RasterEdge .NET imaging basic library, .NET annotating dll and TIFF document dll into your VB.NET desktop application to program following TIFF annotation codes.
There are 12 annotation creating demo codes in total, and the default expanded sample code is for callout annotation adding in VB.NET. Thus, if you need any other annotation type, please click to expand the corresponding title to get details.
VB.NET TIFF: Callout Annotation Adding
''' <summary>
''' Draw and burn a callout annotation on the first page of a TIFF document  
''' </summary>
Public Shared Sub TiffAnotationDemo(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As TIFFDocument = DirectCast(REFile.OpenDocumentFile(filePath, New TIFDecoder()), TIFFDocument)
	'use TIFDecoder open a tif file
	Dim newPage As BasePage = doc.GetPage(pageIdx)

	Dim obj As New RectangleAnnotation()

	' set annotation size

	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property

	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation 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.Blue
	'set annotation edge color
	'set the property of filled shape

	obj.Fill = New AnnotationBrush()
	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow

	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	REFile.SaveDocumentFile(doc, annotatedFilePath, New TIFEncoder())
End Sub
VB Code to Create Embedded Image Annotation to TIFF File
''' <summary>
''' Draw and burn an embedded image annotation on the first page of a TIFF document  
''' </summary>
Public Shared Sub TiffAnotationDemo(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As TIFFDocument = DirectCast(REFile.OpenDocumentFile(filePath, New TIFDecoder()), TIFFDocument)
	'use TIFDecoder open a tif file
	Dim newPage As BasePage = doc.GetPage(pageIdx)

	Dim obj As New RectangleAnnotation()

	' set annotation size

	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property

	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation 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.Blue
	'set annotation edge color
	'set the property of filled shape

	obj.Fill = New AnnotationBrush()
	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow

	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	REFile.SaveDocumentFile(doc, annotatedFilePath, New TIFEncoder())
End Sub

VB Demo Code on Drawing Ellipse to TIFF Page
''' <summary>
''' Draw and burn an ellipse annotation on the first page of a TIFF document  
''' </summary>
Public Shared Sub TiffAnotationDemo(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As TIFFDocument = DirectCast(REFile.OpenDocumentFile(filePath, New TIFDecoder()), TIFFDocument)
	'use TIFDecoder open a tif file
	Dim newPage As BasePage = doc.GetPage(pageIdx)

	Dim obj As New RectangleAnnotation()

	' set annotation size

	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property

	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation 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.Blue
	'set annotation edge color
	'set the property of filled shape

	obj.Fill = New AnnotationBrush()
	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow

	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	REFile.SaveDocumentFile(doc, annotatedFilePath, New TIFEncoder())
End Sub
How to Insert Free Hand Annotation on TIFF Document in VB Class
''' <summary>
''' Draw and burn a free hand annotation on the first page of a TIFF document  
''' </summary>
Public Shared Sub TiffAnotationDemo(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As TIFFDocument = DirectCast(REFile.OpenDocumentFile(filePath, New TIFDecoder()), TIFFDocument)
	'use TIFDecoder open a tif file
	Dim newPage As BasePage = doc.GetPage(pageIdx)

	Dim obj As New RectangleAnnotation()

	' set annotation size

	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property

	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation 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.Blue
	'set annotation edge color
	'set the property of filled shape

	obj.Fill = New AnnotationBrush()
	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow

	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	REFile.SaveDocumentFile(doc, annotatedFilePath, New TIFEncoder())
End Sub
How to Use VB Code to Annotate TIFF File with Free Hand Line Object
''' <summary>
''' Draw and burn a free hand line annotation on the first page of a TIFF document  
''' </summary>
Public Shared Sub TiffAnotationDemo(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As TIFFDocument = DirectCast(REFile.OpenDocumentFile(filePath, New TIFDecoder()), TIFFDocument)
	'use TIFDecoder open a tif file
	Dim newPage As BasePage = doc.GetPage(pageIdx)

	Dim obj As New RectangleAnnotation()

	' set annotation size

	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property

	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation 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.Blue
	'set annotation edge color
	'set the property of filled shape

	obj.Fill = New AnnotationBrush()
	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow

	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	REFile.SaveDocumentFile(doc, annotatedFilePath, New TIFEncoder())
End Sub
Annotate TIFF Page with Hotspot Markup Within VB Project
''' <summary>
''' Draw and burn a hotspot annotation on the first page of a TIFF document  
''' </summary>
Public Shared Sub TiffAnotationDemo(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As TIFFDocument = DirectCast(REFile.OpenDocumentFile(filePath, New TIFDecoder()), TIFFDocument)
	'use TIFDecoder open a tif file
	Dim newPage As BasePage = doc.GetPage(pageIdx)

	Dim obj As New RectangleAnnotation()

	' set annotation size

	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property

	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation 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.Blue
	'set annotation edge color
	'set the property of filled shape

	obj.Fill = New AnnotationBrush()
	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow

	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	REFile.SaveDocumentFile(doc, annotatedFilePath, New TIFEncoder())
End Sub
Draw Hotspot Free Hand Image on TIFF Page by Using VB Code
''' <summary>
''' Draw and burn a hotspot free hand annotation on the first page of a TIFF document  
''' </summary>
Public Shared Sub TiffAnotationDemo(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As TIFFDocument = DirectCast(REFile.OpenDocumentFile(filePath, New TIFDecoder()), TIFFDocument)
	'use TIFDecoder open a tif file
	Dim newPage As BasePage = doc.GetPage(pageIdx)

	Dim obj As New RectangleAnnotation()

	' set annotation size

	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property

	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation 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.Blue
	'set annotation edge color
	'set the property of filled shape

	obj.Fill = New AnnotationBrush()
	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow

	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	REFile.SaveDocumentFile(doc, annotatedFilePath, New TIFEncoder())
End Sub
Create Line Annotation on TIFF Image Using VB Code
''' <summary>
''' Draw and burn a line annotation on the first page of a TIFF document  
''' </summary>
Public Shared Sub TiffAnotationDemo(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As TIFFDocument = DirectCast(REFile.OpenDocumentFile(filePath, New TIFDecoder()), TIFFDocument)
	'use TIFDecoder open a tif file
	Dim newPage As BasePage = doc.GetPage(pageIdx)

	Dim obj As New RectangleAnnotation()

	' set annotation size

	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property

	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation 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.Blue
	'set annotation edge color
	'set the property of filled shape

	obj.Fill = New AnnotationBrush()
	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow

	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	REFile.SaveDocumentFile(doc, annotatedFilePath, New TIFEncoder())
End Sub
Add Lines Objects on TIFF Image in VB.NET Application
''' <summary>
''' Draw and burn lines annotations on the first page of a TIFF document  
''' </summary>
Public Shared Sub TiffAnotationDemo(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As TIFFDocument = DirectCast(REFile.OpenDocumentFile(filePath, New TIFDecoder()), TIFFDocument)
	'use TIFDecoder open a tif file
	Dim newPage As BasePage = doc.GetPage(pageIdx)

	Dim obj As New RectangleAnnotation()

	' set annotation size

	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property

	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation 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.Blue
	'set annotation edge color
	'set the property of filled shape

	obj.Fill = New AnnotationBrush()
	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow

	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	REFile.SaveDocumentFile(doc, annotatedFilePath, New TIFEncoder())
End Sub
Draw Rectangle Annotation Image to TIFF File with VB Methods
''' <summary>
''' Draw and burn a rectangle annotation on the first page of a TIFF document  
''' </summary>
Public Shared Sub TiffAnotationDemo(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As TIFFDocument = DirectCast(REFile.OpenDocumentFile(filePath, New TIFDecoder()), TIFFDocument)
	'use TIFDecoder open a tif file
	Dim newPage As BasePage = doc.GetPage(pageIdx)

	Dim obj As New RectangleAnnotation()

	' set annotation size

	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property

	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation 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.Blue
	'set annotation edge color
	'set the property of filled shape

	obj.Fill = New AnnotationBrush()
	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow

	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	REFile.SaveDocumentFile(doc, annotatedFilePath, New TIFEncoder())
End Sub
VB.NET: Draw Rubber Stamp on TIFF
''' <summary>
''' Draw and burn a rubber stamp annotation on the first page of a TIFF document  
''' </summary>
Public Shared Sub TiffAnotationDemo(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As TIFFDocument = DirectCast(REFile.OpenDocumentFile(filePath, New TIFDecoder()), TIFFDocument)
	'use TIFDecoder open a tif file
	Dim newPage As BasePage = doc.GetPage(pageIdx)

	Dim obj As New RectangleAnnotation()

	' set annotation size

	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property

	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation 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.Blue
	'set annotation edge color
	'set the property of filled shape

	obj.Fill = New AnnotationBrush()
	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow

	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	REFile.SaveDocumentFile(doc, annotatedFilePath, New TIFEncoder())
End Sub
Text Annotation Add-on in VB TIFF Imaging Program
''' <summary>
''' Draw and burn a text annotation on the first page of a TIFF document  
''' </summary>
Public Shared Sub TiffAnotationDemo(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As TIFFDocument = DirectCast(REFile.OpenDocumentFile(filePath, New TIFDecoder()), TIFFDocument)
	'use TIFDecoder open a tif file
	Dim newPage As BasePage = doc.GetPage(pageIdx)

	Dim obj As New RectangleAnnotation()

	' set annotation size

	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property

	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation 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.Blue
	'set annotation edge color
	'set the property of filled shape

	obj.Fill = New AnnotationBrush()
	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow

	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	REFile.SaveDocumentFile(doc, annotatedFilePath, New TIFEncoder())
End Sub

For C# developers, we also offer a tutorial for how to annotate TIFF image using C# code. This tutorial is recommended by many .NET developers who have successfully complete TIFF document annotation task using Visual C# language with our TIFF image annotation SDK for .NET.


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