This tutorial guides you on how to strike through text in PDF with C# Low Code API. You will learn to automatically strike through text on PDF with C# Low Code API using a .NET-based Cloud SDK. It will teach you to customize the striking process by setting various parameters using the exposed methods in the API.
Prerequisite
- Create an account API credentials
- Download Aspose.PDF Cloud SDK for Dotnet to strikeout text in a PDF file
- Setup C# project with the above SDK for striking through text
Steps to Strike Out in Adobe PDF with C# REST Interface
- Configure the PdfApi class object by setting the API key and application SID for striking out text
- Create the StrikeOutAnnotation object and set the rectangle around the text and color of strike out
- Set the modification and creation date of the annotation as it is must require
- Upload the target PDF file to Cloud storage for striking through text
- Call the PostPageStrikeOutAnnotations() method to strikeout text with custom settings
- Download the updated PDF file with strike-through text
These steps define how to strike out text in PDF with C# REST API. Create an object of the PdfApi class, and instantiate the StrikeOutAnnotation object by setting the rectangle around the target text, color, creation date, and modification date. Upload the target PDF file to the Cloud storage and call the PostPageStrikeOutAnnotations() method to accomplish the task.
Code to Strike Through in PDF with C# .NET-based API
This code snippet demonstrates how to strikeout in PDF with C# REST Interface. You may set the strike out annotation properties such as page index, ZIndex, horizontal and vertical alignment, name, subject, and title. You may add as many annotations as required in the list and call the PostPageStrikeOutAnnotations() method to apply all the annotations.
This article has taught us how to strike out text in PDF. If you want to replace text in a PDF file, refer to the article on Replace text in PDF with C# rest API.