Answered
I have a PDF document with serveral custom document properties. Is there a way in the javascript api to retrieve the values of the custom properties? I have searched and have not found a way.
Thx
I have a PDF document with serveral custom document properties. Is there a way in the javascript api to retrieve the values of the custom properties? I have searched and have not found a way.
Thx
You can use:
for (var i in this.info)
console.println(i + ": "+ this.info[i]);
To list the property name and value for the properties of a PDF.
The following code:
var docTitle = this.info.Title;
this.info.Title = "JavaScript, The Definitive Guide";
this.info.ISBN = "1-56592-234-4";
this.info.PublishDate = new Date();
Will add the custom properties of 'ISBN' with a value of "1-56592-234-4" and 'PublishDate' with the current date and time and set the standard property 'Title' witha value of "JavaScript, The Definitive Guide".
More infromation is in the Acrobat JS API Reference.
George Kaiser