The objective of this article is to provide guidance on how to add strikeout annotation in PDF using C#. Adding a strikeout annotation to a PDF file can be a useful for emphasizing certain text or content. Fortunately, with the help of commonly used annotation library, you can insert strikeout annotation in PDF using C# easily. To achieve this, we have listed the required steps that you need to follow.
Steps to Add Strikeout Annotation in PDF Using C#
- Utilize the NuGet package manager to install GroupDocs.Annotation for .NET
- Include namespace reference of GroupDocs.Annotation into your project
- Instantiate an object of the Annotator class by providing the path of the PDF file to its constructor
- Create a new instance of the StrikeoutAnnotation class and assign values to its properties, such as page number and background color
- Call the Add method of the Annotator class, passing the StrikeoutAnnotation object as a parameter
- Utilize the Save method of the Annotator class to store the resulting PDF on the disk
These instructions demonstrate the process of installing the annotation library on your computer, which will enable you to create strikeout annotation to PDF in C#. You do not require any supplementary software for inserting strikeout annotations into PDF file. These instructions are compatible with commonly used operating systems, such as Windows, macOS, and Linux. The following code example illustrates how to add a strikeout annotation to a PDF.
Code to Add Strikeout Annotation in PDF Using C#
The previous section covered the details of C# strikeout annotation in PDF. We also provided a basic code example that only requires a few API calls. Once you have installed the annotation library and updated the input and output file paths, you can easily integrate the code into your applications. Congratulations, you have successfully added a strikeout annotation to a PDF file using C#.
We have previously covered the topic of adding underline annotations to PDF files. For more information on this topic, please refer to our guide on how to add underline annotation into PDF using C# .