Strike Through Text in PDF with C# REST API

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

Steps to Strike Out in Adobe PDF with C# REST Interface

  1. Configure the PdfApi class object by setting the API key and application SID for striking out text
  2. Create the StrikeOutAnnotation object and set the rectangle around the text and color of strike out
  3. Set the modification and creation date of the annotation as it is must require
  4. Upload the target PDF file to Cloud storage for striking through text
  5. Call the PostPageStrikeOutAnnotations() method to strikeout text with custom settings
  6. 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.

 English