Recently I was on-site with a development team, and a developer couldn’t figure out why certain functionality wasn’t working in Output.
Looking at the server-log we saw the following things :
script=form1.Text2.rawValue = util.printd( “dd/mm/yyyy”, new Date() );
WARN [com.adobe.document.XMLFormService] ALC-XTG-029-459:  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.