The Difference Between Static and Dynamic


I am new to PDF development with Adobe LiveCycle Designer ES and do not understand the difference in the terminology between a “static” PDF and a “dynamic” PDF.  Isn’t a “static” PDF just a regular PDF that is downloaded and printed?

One of the first things I want to make sure is clear is that a “static” PDF document can still provide interactive fields to a user that has downloaded a PDF and has opened it with the free Adobe Reader or Adobe Acrobat.  Calculations can occur and a great deal of interaction can take place between the user and the PDF form.  Although it can be, it is not limited to the constraints of a document that is simply downloaded and printed or simply viewed.  In the LiveCycle Designer world we typically call a non-interactive print & view document a “flat” PDF.

The difference lies with the actual look and feel of the form.  With a static form the fields of the form remain in the same position and look the same way.  The number of pages also remains the same.  If you opened PDF that had 30 fields and 5 pages, when you submit it electronically or print it out, it will still have 30 fields and 5 pages.  A dynamic form on the other hand, may have fields that change in number, appearance, size, color, any number of aspects.  Entire sections of the form can appear, disappear, or repeat any number of times.  The dynamic form you submit electronically or print out, may look entirely different from the document you started with.  A document with 30 fields and 5 pages may turn into a document with 10 fields and 1 page or 300 fields and 50 pages depending on the logic encoded into the form.

Where people usually run into difficulty and end up with a little less hair at the end of the day is with the “Save As” part of the Design process.  If you save a PDF form as an “Adobe Static PDF Form (*.pdf)” the appearance of the form will not change regardless of your code. Of course, if you save your form as an “Adobe Dynamic XML Form (*.pdf)” and there’s no code in your form that would cause it to change then it simply won’t change.

(Click Image to Enlarge)

To demonstrate the concept very simply (and without getting into subforms), take a look at these two samples.  Both are identical with the exception that one is “saved as” static and the other dynamic:

You should notice that the check box of the static form does nothing while the check box on the dynamic form makes the “shipping” section of the form appear and disappear, dynamically changing the appearance of the form. The code that causes the change in appearance in the forms is identical.  You may also notice that the Acrobat debugger console (Ctrl-J from Acrobat) does not indicate any errors in the static form even though the code does not appear to be functioning correctly.  The JavaScript code in the exit event of “Name” that copies it’s value into the “Name” field below works well in both forms.

So, to share what will become a naturally occurring best practice when creating a new form: Immediately go to the properties of the PDF (right-click the Preview PDF tab) change the Default Language to JavaScript (under the Defaults tab), change the PDF Render Format to Dynamic XML Form and then finally, File – Save As an “Adobe Dynamic XML Form”.