Output and the Use of Acrobat APIs

Recently I was on-site with a development team, and a developer couldn’t figure out why certain functionality wasn’t working in Output.

He developed an XDP-based document that contained functionality (written in Javascript) to display the right information based on certain conditions. When previewing the form in Forms Designer the desired functionality worked correctly.

Looking at the server-log we saw the following things :

WARN  [com.adobe.document.XMLFormService] ALC-XTG-029-292: [3076] Script failed (language is javascript; context is xfa[0].form[0].form1[0])
script=form1.Text2.rawValue = util.printd( “dd/mm/yyyy”, new Date() );
WARN  [com.adobe.document.XMLFormService] ALC-XTG-029-459: [3076] Error: util is undefined


So the question is : why is  the util-api undefined?
And the answer is simple: because it is an Acrobat-only api which is not available in Output.

That is also the reason why it is working in Forms Designer, but not when you generate the document via Output. When you preview a document in Designer, you are using Reader/Acrobat.

If you want to see a full list of the available Acrobat-apis look here.


The solution for this problem is to avoid using Acrobat-apis in Output-only related documents, and use other apis that are available in Output. For example if you try to parse xml via the XMLData-api, you can also use the E4X-functionality in Javascript.

About Feike Visser

Feike is an Adobe Marketing Cloud architect, working for Adobe Consulting in EMEA.
This entry was posted in Adobe LiveCycle ES2 (9.0.x) and tagged , , . Bookmark the permalink.

Comments are closed.