使用 C# 提取 PDF 表单数据并转换为 XML

11月 5, 2025
Document Solutions for PDF 为开发人员提供了一种从可填写的 PDF 表单中提取数据来作为 XML 进行处理或存储的强大方法。

继续用英语阅读:

Document Solutions for PDF (DsPdf, formerly GcPdf) is a high-speed, feature-rich, server-side PDF API Library for .NET with no dependencies on Adobe Acrobat. DsPdf allows developers to programmatically create, manipulate, import/export, and deploy PDF documents, including AcroForms, across desktop and web applications at scale. With full .NET support, you can generate, load, modify, and convert PDFs in your app for .NET, Mono, Xamarin.iOS, and Xamarin.Android.

In this blog post, MESCIUS Product Marketing Specialist Mackenzie Albitz demonstrates how to use Document Solutions for PDF to extract and convert PDF Form data using just a few lines of code. The steps include:

  • Importing Required Namespaces.
  • Loading the PDF Form.
  • Exporting Form Data to a Memory Stream.
  • Exporting Form Data to an XML File.
  • Verifying the XML Output.

Detailed source code and examples are included to get you started.

Read the complete blog to learn how to automate the processing and storage of PDF Form data.

Document Solutions for PDF is licensed per developer and is available in several license options for differing distribution needs. Team licenses are also available for multiple developers within the same organization. See our Document Solutions for PDF licensing page for full details.

Document Solutions for PDF is available to buy individually or as part of Document Solutions .NET Bundle.