This tutorial helps you to understand how to update PDF metadata with C# REST API. You will learn to change PDF properties with C# REST Interface using the Cloud-based .NET SDK without using any third-party tool. A few properties are modified in the sample code to demonstrate the process.
Prerequisite
- Create an account API credentials
- Download Aspose.PDF Cloud SDK for Dotnet to change the properties
- Setup C# project with the above SDK for updating metadata
Steps to Edit PDF Properties with C# Low Code API
- Create the PdfApi object and set the client ID and secret for updating the metadata
- Upload the source PDF file using the UploadFile method by providing the file name
- Call the PutSetProperty() method and set the desired property name and new value
- Repeat the above step as many times as required to update all the required properties
- Download the updated PDF file with new metadata from the cloud and save it on the disk
The above steps clarify the process to change properties of PDF file with C# RESTful Service. Upload the PDF file by setting the file name in the cloud storage, call PutSetProperty() multiple times to update various properties, and download the updated PDF file with new properties.
Code to Modify PDF Properties with C# REST API
This code snippet has demonstrated how to edit PDF file properties with C# Low Code API. Call the PutSetProperty() method repeatedly to update multiple properties. You may handle the error codes from the API response for each call to the PutSetProperty() and may repeat the process if required.
This topic has explained the process of updating the PDF file properties. If you want to rearrange the pages in a PDF file, refer to the following articles: Reorder PDF pages with C# REST API.