Thursday, August 09, 2012

How to Render PDF Forms in Mobile

Being ex-Adobe alumni, a lot of questions asking how to best render Adobe PDF forms on mobile devices come this way.  Some are about XFA forms on mobile devices, some Acrobat forms on mobile devices, but all of these have the same answer.   Don't!   Yes, this sounds abrupt and there is a multi-million dollars investment into PDF forms that would be great to turn on to mobile, but PDF was not designed for mobile.  Let's examine a few aspects of why.

First, the core PDF specification needs to be understood.  Portable Document Format (PDF) documents were designed to run on many different desktop computers.  A PDF document is "distilled" from different types of components.  There are a few basics types of objects and that is where the differences from image file formats like JPG or TIFF start.  PDF documents have headers, which are very small and contain only rudimentary information.  The second part is the body which contains objects.  Objects are numbered and can be of many types themselves.  There are cross references and then the trailer.  Besides these, the types of things you might find inside a PDF document are fonts, XMP metadata, a signature dictionary, the PDF envelope, attachments, annotations, embedded files such as images and more.

They are great for that but the model is different for the execution environment.  Mobile devices rotate the screen when the user twists the device.  A PDF is often laid out in absolute x,y coordinates which do not work well on mobile devices.  PDF's also have scripting in not one but two different languages - formCalc and JavaScript.  A PDF may have event listeners for things like "hover" which has no equivalent on a mobile device.  Tabbing order, listening for events like a window being active and more are not relevant.  BLOAT!  The long and short of this point is that PDF was just not designed for mobile.

Now Adobe and others have done a good job of rendering normal PDF's on mobile, but forms, especially flowable, multi-page PDF forms, present some huge challenges.  With soft keyboards (the popup keyboards on popular smart phones for example), the rest of the document must ensure that the form fields are not covered when then user is typing.

So what do you going to do if you have made a huge investment into something like Adobe LiveCycle ES for forms based business processes and now have to support mobile devices?  Technoracle has a solution for this today.  You also can re-write your forms from scratch (costly) or build custom native applications for each platform.