One more clarification: If you check with
for (var i in this.info)
console.println(i + ": "+ this.info[i]);
Anybody who has got a suggestion on how to solve this? - Please?!
That code will add custom metadata to the info object, but you want to add standard XMP metadata as demonstrated here: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.403.html
Thanks a lot! Works like a charm. In Example 3 there are two semicolons missing in line 3 and 5, though.
It is even possible to add new custom tags to info object.
this.info.Copyright = "Copyright \xA9" + new Date().getFullYear() + " by Example Corp. all rights reserved."; ;
this.info.CopyrightURL = "http://www.example.com/about/terms";
this.info.contactEmail = "email@example.com";
// show the new info data
console.println("copyright text: " + this.info.Copyright);
console.println("copyright URL: " + this.info.CopyrightURL);
console.println("copyright email: " + this.info.contactEmail);
The custom field can be seen the "Custom" tab for the PDF properites