JavaScript > JavaScript for Acrobat API Reference > JavaScript API > Doc > Doc properties > info

info
 
D
Specifies an object with properties from the document information dictionary in the PDF file. (See the PDF Reference). Standard entries are:
	Title
	Author
	Authors							(Acrobat 9.0)
	Subject
	Keywords
	Creator
	Producer
	CreationDate
	ModDate
	Trapped 
For Acrobat, properties of this object are writeable and setting a property dirties the document. Additional document information fields can be added by setting non-standard properties.
In Adobe Reader, writing to any property in this object throws an exception.
Note: Standard entries are case insensitive, that is, info.Keywords is the same as info.keywords.
Acrobat 9.0 intoduces the Authors (authors) property of the info object. Use Authors to retrieve a seim-colon delimited list of authors. Author information is saved in the XMP metadata, and Doc.info.Authors retrieves the information from the metadata as an array. Individual authors can be accessed. See Example 3 (Acrobat 9.0) below.
Type
Object
Access
R/W (Adobe Reader: R only)
Example 1
Get the title of the current document.
	var docTitle = this.info.Title;
Example 2
Get information about the document.
	this.info.Title = "JavaScript, The Definitive Guide";
	this.info.ISBN = "1-56592-234-4";
	this.info.PublishDate = new Date();
	for (var i in this.info) 
		console.println(i + ": "+ this.info[i]);
The above script could produce the following output:
	CreationDate: Mon Jun 12 14:54:09 GMT-0500 (Central Daylight Time) 2000
	Producer: Acrobat Distiller 4.05 for Windows
	Title: JavaScript, The Definitive Guide
	Creator: FrameMaker 5.5.6p145
	ModDate: Wed Jun 21 17:07:22 GMT-0500 (Central Daylight Time) 2000
	SavedBy: Adobe Acrobat 4.0 Jun 19 2000
	PublishDate: Tue Aug 8 10:49:44 GMT-0500 (Central Daylight Time) 2000
	ISBN: 1-56592-234-4
Example 3 (Acrobat 9.0)
This example demonstrates how to set and to get multiple authors. Multiple authors may also be entered through the Description tab of the Document Properties dialog box.
Set three authors for this document.
this.info.Authors=["Robat, A. C.", "Obe, A. D.","Torys, D. P."];
Execute this.info.Authors in the JavaScript Debugger Console window, the result is given below.
Robat, A. C.,Obe, A. D.,Torys, D. P.
Get each of the authors.
for (var i=0; i<this.info.Authors.length; i++)
    console.println((i+1) + ": " + this.info.Authors[i]);
The result ,as reported in the Console window, is given below.
1: Robat, A. C.
2: Obe, A. D.
3: Torys, D. P.