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

collection
 
The value of the collection property is a Collection object of the collection in this PDF. Properties of the collection may be changed through the Collection object.
Note: A PDF file cannot be converted into a PDF collection. The attribute of a document as a PDF collection cannot be removed.
If a new collection is desired, use app.newCollection.
Type
Collection object or a null object if there is no collection in this PDF.
Access
R
Example
if (this.collection) {
   var collection = this.collection;
   // Do something with the collection...
}