In this tutorial we will concentrate how to add link annotation to PDF using C# by utilizing one of the most popular annotation library. A link annotation indicates that a remote resource can be accessed through a hyperlink. We will guide you with complete directions to create annotation link in PDF using C# along with working C# code example that can be executed on any system where .NET is installed. The implementation of adding link annotation into PDF is well explained below.
Steps to Add Link Annotation to PDF using C#
- Install GroupDocs.Annotation for .NET package from the NuGet to create link annotation
- Add a reference to the GroupDocs.Annotation namespace for PDF link annotation
- Initialize Annotator object by passing input PDF path
- Initialize LinkAnnotation object and set properties for the link annotation
- Call Annotator.Add method and pass the LinkAnnotation object to it
- Finally, call Annotator.Save method to save the resultant PDF to disk
Using the above steps, you can insert link annotation in PDF using C# with annotation library without installing any additional software on your system. You can use it on any platform where .NET technology is supported for the insertion of link annotation. Following code example inserts link into PDF and set some properties of LinkAnnotation.
Code to Add Link Annotation to PDF using C#
In above section, we have explained all the vital steps to insert link in PDF using C# along with a working code example that you can modify according to your requirement. This tutorial covers adding link annotation using C#; however, you can add other types of annotation such as ellipse, highlight, image, strikeout, search text and many more using annotation library.
In this topic, we discoursed how to add link annotation in C# and developed a sample application. An article we recently published on removing annotation reply from PDF is available, have a look at how to remove annotation reply from PDF using C# guide for more information.