Get PDF AcroForms via .NET SDK
API for extracting AcroForms from PDF docuemnts using Aspose.PDF Cloud .NET SDK.
Get StartedHow to Get AcroForm Fields from PDF Document using Cloud .NET SDK
In order to get an AcroForm via Cloud .NET SDK , we’ll use
Aspose.PDF Cloud .NET SDK
This Cloud SDK allows you to easily build cloud-based PDF creator, editor & converter apps in C#, ASP.NET, or other .NET languages for various cloud platforms. Open
NuGet
package manager, search for
Aspose.PDF Cloud
and install. You may also use the following command from the Package Manager Console: PM> Install-Package Aspose.Pdf-Cloud
Steps to get AcroForms via .NET SDK
Aspose.PDF Cloud developers can easily load & get acroforms in PDF in just a few lines of code.
- Create a new Configuration object with your Application Secret and Key
- Create an object to connect to the Cloud API
- Upload your document file
- Perform the getting
- Download the result
This sample code shows getting an AcroForms in PDF documents
public static void GetFormFields()
{
const string localImageFileName = @"C:\Samples\StudentInfoFormElectronic.pdf";
const string storageFileName = "StudentInfoFormElectronic.pdf";
// Get your AppSid and AppSecret from https://dashboard.aspose.cloud (free registration required).
var pdfApi = new PdfApi(AppSecret, AppSid);
if (pdfApi.GetFilesList("").Value.All(f => f.Name != storageFileName))
{
using var file = File.OpenRead(localImageFileName);
var uploadResult = pdfApi.UploadFile(storageFileName, file);
Console.WriteLine(uploadResult.Uploaded[0]);
}
var response = pdfApi.GetFields(storageFileName);
foreach (var item in response.Fields.List)
{
if (item.Type == FieldType.List)
{
Console.Write($"Name: [{item.Name}] Value:");
foreach (var listItem in item.Values)
{
Console.WriteLine($"{listItem} ");
}
}
else
{
Console.WriteLine($"Name: [{item.Name}] Value: [{item.Values.FirstOrDefault()}]");
}
}
}
- Learning Resources
- Documentation
- Source Code
- API References
- Product Support
- Free Support
- Paid Support
- Blog
- Why Aspose.PDF Cloud for .NET?
- Customers List
- Security