This tutorial provides guidance to read the information and download PDF attachment with C# REST API using a .NET-based SDK. You will learn to read the details of the attachments in a PDF file and download the specific attachment if required. It has a sample code to analyze PDF file attachments and view attachments in PDF with C# REST API.
Prerequisite
- Create an account API credentials
- Download Aspose.PDF Cloud SDK for Dotnet to read attachment information in a PDF file
- Setup C# project with the above SDK for working with attachments
Steps to Open Attachment in PDF with C# REST Interface
- Configure the PdfApi object by setting the API key and APP SID for reading attachment information
- Upload the source PDF file with attachments to the Cloud storage for reading the details
- Call the GetDocumentAttachments() method to fetch the attachment’s information
- Display the PDF file attachments count and basic information
These steps define the process to read information of Adobe PDF attachments with C# .NET-based API. Load the source PDF file to Cloud storage with attachments. Call the GetDocumentAttachments() method in the PdfApi class and display the attachments list and count.
Code to View PDF Attachments with C# REST Interface
This code demonstrates how to access attachment in PDF file with C# REStTful Service. It provides a list of attachments and information such as Href, Rel, Type, and Title. You may use the GetDownloadDocumentAttachmentByIndex() method to download the target attachment stream for reading and saving on the disk.
This article has taught us the process of accessing PDF attachments. If you want to read text from a PDF file, you may refer to the article on Extract Text from PDF Document with C# REST API.