0

My company is creating a PDF survey (intended for other companies to complete) and we're trying to make the solution interactive (conditional checklists that become visible based on the status of other selections).

However, we're wary of doing anything that a surveyed company's IT department will flag while looking for possible malware. This would slow down the whole process.

So JavaScript is right out.

My question is, are the Actions that Adobe PDF includes for object properties also detected and treated as JavaScript?

I'm experimenting with simple visibility actions to create the effect we want, but don't want to make a big circle back into the same problem...

2 Answers2

1

Smart PDF forms are using Acrobat JavaScript, a specific flawor of JavaScript, suited to the use in PDF document, together with the PDF Object Model.

Acrobat JavaScript runs in a pretty well sealed sandbox, and has only a very limited number of accesses to the outside world, and all of them require an user action to be executed.

You might create a very simple form, using elementary Acrobat JavaScript, password-protect (owner password is sufficient) and/or Reader-enable it, and have it checked by the IT department.

I would bet, they would not notice much…

A potentially more important issue has been mentioned in the comments. Many (very many) PDF viewers are too dumb to deal with smart documents (meaning documents containing JavaScript). There are strategies to deal with that fact, by "charging" the document for a dumb viewer, and have JavaScript code executed when the document opens, which activates the "smart" personality of the document.

Max Wyss
  • 139
  • 2
1

It is possible to create a PDF Form with actions that affect other fields on the form. For example, a checkbox could carry an action that will hide another field. This uses the Hide action and does not add any JavaScript to the PDF.

Note that this is not the same as a dynamically laid out form: the field will be invisible but the space it occupies on the page will remain. The only dynamic form layout method available in PDF is XFA, which is not widely supported.

Rob Lyman
  • 131