Add New Page in PDF with C# REST API

This short tutorial guides how to add new page in PDF with C# REST API. You will learn to add a new page in PDF with C# Low Code API using the .NET-based Cloud SDK. Once you add a new page online, you will learn to download and save the output on the disk.

Prerequisite

Steps to Insert New Page in PDF with C# .NET-based API

  1. Configure the client ID and secret in the PdfApi for adding a page
  2. Upload the source PDF file where an empty page is to be added
  3. Call the PutAddNewPage() with the uploaded PDF file name in the cloud storage
  4. Download the modified PDF file that has an empty page at the end and save it on the disk

These steps define the process to add extra page in PDF with C# RESTful Service. Initialize the PdfApi object, load the target PDF file to outline Cloud storage, and call the PutAddNewPage() method to add an empty page. Next, download the output PDF file stream and save it on the disk.

Code to Insert New Page Into PDF with C# RESTful Service

The above code demonstrates how to add another page in PDF with C# .NET-based API. You can add as many pages as required by calling the PutAddNewPage() multiple times. Use the same name to download the output PDF file from the online storage that you have used to upload the source PDF file using the UploadFile().

This article has guided us to add new pages to PDF with C# REST Interface. If you want to append a PDF file to another PDF file, refer to the following article: Append PDF with C# REST API.

 English