This tutorial guides how to add text to PDF with C# REST API. You will get guidance to automatically write on PDF with C# Low Code API by adding a paragraph that consists of multiple lines and segments. You can customize each line and segment with different formatting as described in this article.
Prerequisite
- Create an account API credentials
- Download Aspose.PDF Cloud SDK for Dotnet to add a paragraph in a PDF file
- Setup C# project with the above SDK for writing text
Steps to Edit PDF File with C# REST Interface
- Create a PdfApi object using the API key and APP SID for adding text
- Create a paragraph by setting the text lines and rectangular area for the text
- Upload the target PDF file to the Cloud storage for adding text
- Call the PutAddText method to write a paragraph to the PDF file
- Download the updated PDF file with new text in it
The above steps describe how to develop a PDF text editor with C# RESTful Service. Create segments and text lines which are later used to create a paragraph with the specified contents. Upload the target PDF file and call the PutAddText() method to write the paragraph with multiple lines and segments.
Code to Write on PDF File with C# .NET-based API
This code demonstrates a program to edit PDF with C# REST API. You can set the text alignment, font settings, color, strikeout, underline, subscript, superscript, margins, wrapping mode, and many other properties as needed. Provide the page number starting from 1 for inserting text on a page.
This article has taught us how to write on PDF document with C# Low Code API. If you want to strike out an existing text in a PDF, refer to the article on Strike Through Text in PDF with C# REST API.