


Good day,
It would seem that the xfa.log object has been removed in LC Designer ES2. What alternative mean is there to write data to the log tab? (Javascript alerts is out of the question.)
Views
Replies
Total Likes
The xfa.log object is still around -- but it exists only when executing in the context of the server. In acrobat if you check typeof xfa.log it will tell you "undefined".
Server-scripts will run in Designer under certain circumstances. It depends on the kind of file you're saving:
- save-as XDP: no script will run.
- save-as static PDF: all scripts will run
- save-as dynamic PDF: only scripts marked to run-at server will execute (scripts marked runat "client and server" do not execute)
Some of this is explained at:
http://blogs.adobe.com/formfeed/2009/05/template_transformation.html
John
Views
Replies
Total Likes
( It would have been nice if the designer object were available when previewing the form. That way a developer could log 'live' messages using designer.println(). )
Views
Replies
Total Likes
I see the commands in the object assist but I always get an accessor error when the command executes. Are you seeing the same behaviour?
You can also use the javascript command console.println("This is my message") to write a message to the javascript console.
paul
Views
Replies
Total Likes
Hello pguerett,
I just tried turning on the statement completion 'feature' (it's the mother of inpredictability - "Was it tab, space or return?"). I take it that's what you're refering to by 'object assist'. It does show there's a log object tucked in there.
I doubt however that is the case. This snippet tells me it doesn't even exist as an internal member of xfa:
xfa.log = function() {
return {message: function() {return "overloaded";}}
}();
xfa.log.message();
(Doing the same for xfa.host.print() yields an entirely different result.)
Producing javascript alerts/console dumps won't do since the messages I'm producing is "for form designers only", in order for them to track the existence of certain "heritage objects" due for manual removal. There's no need to risk these messages slipping through to the production environment.
Views
Replies
Total Likes
The xfa.log object is still around -- but it exists only when executing in the context of the server. In acrobat if you check typeof xfa.log it will tell you "undefined".
Server-scripts will run in Designer under certain circumstances. It depends on the kind of file you're saving:
- save-as XDP: no script will run.
- save-as static PDF: all scripts will run
- save-as dynamic PDF: only scripts marked to run-at server will execute (scripts marked runat "client and server" do not execute)
Some of this is explained at:
http://blogs.adobe.com/formfeed/2009/05/template_transformation.html
John
Views
Replies
Total Likes