Not all forms are PDF forms

We had an inquiry today about converting PDF forms to HTML5 forms in some documents. When we investigated, this was not possible. This article explains what the issue was and why forms are not necessarily PDF forms.

The PDF file spec allows you to add Interactive Form elements to a PDF file as Annotations (on a page by page basis) or to the Document as FDF element or the new XFA style XML format. These are PDF forms (which have PDF form elements). Our software then converts the PDF forms to HTML5 form elements. You can double-check by seeing if the PDF contains any Annots of Forms elements.

It is also possible to create PDF versions of pages (for example Excel spreadsheets) which look like forms. They contain empty or filled boxes. But they are flat PDF files – they contain no interactive PDF form elements. So they are ‘forms’ but not PDF forms which you can interactive with or convert to HTML5.

The PDF file format is very powerful and does a brilliant job of showing content – sometimes too good as our brains imagine details are in the PDF (such as text structure or forms) which are not actually there.

This post is part of our “Understanding the PDF File Format” series. In each article, we discuss a PDF feature, bug, gotcha or tip. If you wish to learn more about PDF, we have 13 years worth of PDF knowledge and tips, so click here to visit our series index!

Related Posts:

The following two tabs change content below.

Mark Stephens

System Architect and Lead Developer at IDRSolutions
Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX. He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.
Markee174

About Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX.

He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>