PDF Association logo

Discover pdfa.org

Key resources

Get involved

How do you find the right PDF technology vendor?
Use the Solution Agent to ask the entire PDF communuity!
The PDF Association celebrates its members’ public statements
of support
for ISO-standardized PDF technology.

Member Area

A fillable form

Bringing PDF forms up-to-date

John Brinkman provides an update on the work of the PDF Association’s Forms TWG and its development of the next generation of PDF forms.
About the author: John joined Adobe via the acquisition of Accelio in 2002.   He is a client side architect working on the Adobe Document Cloud product.  Prior to Document Cloud, John worked on … Read more
John Brinkman

John Brinkman
August 25, 2022

Article


Print Friendly, PDF & Email

Forms functionality in PDF has not received much attention in quite some time. The definition of PDF-based forms has not changed in over 20 years. Meanwhile, web-based forms have evolved considerably.

We are past-due to refresh our technology stack and to address new use-cases for forms. To that end, the PDF Association has operated the PDF Forms TWG for almost two years to define the next generation of forms. If that sounds like a big change – it is. But the basic structure of forms in PDF will not change. There will still be a Fields array and if a legacy forms processor were to encounter a next-generation form, it should be minimally functional.

Highlights

To give you a taste for what the working group is doing, here are some of the highlights:

Responsive mode

Forms need to work in responsive mode. In practice this means that we can derive fully functional HTML- based forms from our PDF-based form definitions.

Accesibility

HTML has long embraced Accessible Rich Internet Applications (ARIA). Some of those concepts find their way into the spec – most notably, there will be a new annotation type that will supply the equivalent functionality of the HTML label and legend elements.

JSON

Twenty years ago, we exchanged data using XML. Now we need our forms to submit and import JSON data. To take that a step further, our forms will be able to process a complete JSON-Schema definition without requiring that all data be associated with field definitions.

Declarative constraints

Both HTM5 and JSON-Schema offer declarative syntax for defining constraints on fields/data. E.g. data types, min/max, pattern etc. Where in the past most of these constraints would be left to the JavaScript programmer, they will now be part of a new constraints dictionary.

Eliminate JavaScript

The use of JavaScript in forms has become problematic:

  • Security concerns around allowing user-authored JavaScript to execute in browser-hosted PDFs
  • The requirement for form authors to be JavaScript literate

Our alternative is an expression grammar that is a mash-up of Open Formula spreadsheet formulas and JMESPath for JSON handling. To jump-start implementors, an open-source JavaScript version of json-formula is under development. This grammar is designed to allow simple operations to be obvious to anyone with basic spreadsheet skills -- but also powerful enough to support complex operations by power-users.

Extensibility

There are several built-in extension mechanisms:

  • Support for custom widgets
  • User-defined properties on fields
  • (previously mentioned) embedding customer data in the pdf
  • Emit/listen on custom events

Date / time and time zone support

Date and datetime formats are native to the form processor. Forms/Fields can declare which time zone to use for capturing/displaying values. That time-zone-aware hotel booking form will be easy to develop.

Locale support and formatting

Forms and fields define their locale to allow correct handling of date/time, number, and currency values. The underlying technology is based on the number and date skeletons that are part of the International Components for Unicode (ICU) standard. This standard is also a basis for the JavaScript Intl package.

Next Steps

The functionality we expect to cover is largely complete. We are at the stage of validating it via reference implementation and beginning the formal documentation. We would welcome additional participation in the PDF Forms TWG – whether for review or for additional reference implementation(s).

 

Editor's Note: John Brinkman will be presenting at PDF Days Europe 2022 on Next Generation Forms for PDF.

WordPress Cookie Notice by Real Cookie Banner