Quantcast
Channel: Developer Express Inc.
Viewing all articles
Browse latest Browse all 2370

Populate PDF Forms with the DevExpress Office File API (Using .NET MAUI Edit Forms Generated on the Fly)

$
0
0

This is the second post in our Office File API and .NET MAUI blog series. In this post, I’ll explain how to create and populate interactive form fields within PDF files.

To learn more about synergies between our Office File API and .NET MAUI-powered mobile apps, please review the first post in this series: Office File API — An Easy Way to Personalize User Messages and Use Word Document Templates in .NET MAUI Mobile Apps

Populate PDF Form Fields in your .NET MAUI Mobile App

An interactive form (also known as an AcroForm) is a type of PDF form with additional elements called interactive fields. These fields allow users to enter information and allow developers to extract data as needed. If you've used AcroForm in the past, you are already aware of its strengths (standardization, simplicity of use/implementation, compatibility with most PDF processors, and PDF-compliant data input).

The DevExpress PDF Document API library (included in our Office File API suite) ships with a comprehensive Interactive Form API subset. Our PDF Document Processor can detect editor type and change its properties and values. It can also generate new form fields.

Mobile-Friendly Field Editing

One issue when populating form fields in mobile apps is the size of individual editors. In many instances, form field editors are simply too small for mobile or tablet screens.

To address this, you can generate a user interface on the fly with the help of the DevExpress .NET MAUI DataFormView UI component (allows you to populate forms in a loaded PDF file). Our DataFormView component uses the most appropriate editor for each PDF file field.

If you are targeting .NET MAUI and are considering the use of AcroForm, please review the following GitHub example for implementation details: Populate E-Forms in a PDF File

The example opens a PDF File, obtains form fields so they can be populated, and saves results.

In this sample app, the DevExpress PDF Document API is used to retrieve form field information and save results (form field information is passed to a dictionary object).

We use the DevExpress .NET MAUI DataFormView component to:

  • Generate editors on the fly
  • Add editor masks
  • Validate editor values

As you'll discover once you obtain this sample project, our PdfDocumentProcessor component extracts detailed AcroForm information from the loaded PDF file. This information includes form field type/value, default text used as a placeholder, mandatory form fields, etc.

For more information on app structure, please refer to the following article: Populate E-Forms in PDF Files

Get Started with DevExpress .NET MAUI UI Controls and Our Office File API

Our .NET MAUI UI libraries offer a variety of compelling features for your next great mobile app. Refer to the following step-by-step guides if you are new to .NET MAUI and our PDF Document API:

And don't forget to check out the following .NET MAUI/Office File API integration blog posts as well:

Download our fully-functional 30-day trial version and try out DevExpress Office File API libraries in your projects:

Download Trial

Viewing all articles
Browse latest Browse all 2370

Trending Articles