DynaPDF Manual - Page 227

Previous Page 226   Index   Next Page 228

Function Reference
Page 227 of 777
A collection consists of a normal PDF document (container PDF) that can be created in the usual
way, and of a set of file attachments. The difference between a normal PDF file and a portable
collection is that the viewer application provides navigation facilities for the file attachments and it is
possible to open attached PDF files directly in the viewer application without loosing the navigation
plane of the container PDF.
When a PDF 1.7-compliant viewer application first opens a PDF document containing a collection, it
displays the contents of the initial document, along with a list of the embedded files.
The initial document is usually taken from the embedded files while the container PDF consists of
only one page that displays a message that this PDF file is a collection that requires a PDF 1.7
compliant viewer which is aware of PDF collections.
Older viewer applications display just the container PDF while a PDF 1.7 compliant viewer opens
the initial document taken from the embedded files in this case.
However, the initial document can be the container PDF or one of the embedded documents. The
default initial document is the container PDF. If an embedded file should be initially opened then
mark the embedded file as default file with SetColDefFile().
Adobe has changed the way how PDF Collections are displayed in Acrobat 9 or higher. So, the
information provided in the following section is no longer fully valid. The main difference is that
Acrobat 9 or higher displays the embedded files as thumbnails in a navigation pane. The fields
FileName and Description are shown below or beside the thumbnail. The other fields are displayed
in the Properties dialog of an embedded file.
Acrobat 9 or higher support also SWF files to manage the collection presentation. It is not possible to
create SWF based collections with DynaPDF but it is possible to import such a collection and to add
further embedded files to it.
The embedded files of a collection are shown in a list view in Acrobat or Reader 8. Without
adding further information to the collection, the list view contains a set of default columns such
as file name, description, modification date and so on, displayed in the current language of the
viewer. The information displayed in the rows is taken from the embedded files.
The information displayed in the list view can be customized to your own requirements. To
understand how this works keep in mind that a list view consists of columns and rows. The
columns which should be displayed are defined in the collection (collection fields) while the
information displayed in the rows is taken from the embedded files.
To customize the list view of a collection you must first create one or more collection fields with
CreateCollectionField(). The function defines the column name as well as the key and data type
to be used for that column. The information for the collection field is stored in the embedded
Therefore, each field that was defined in the collection should have a related collection item in
all embedded files file specification dictionaries. However, only user defined fields require a

Previous topic: CreateColItemString, CreateCollection

Next topic: CreateCollectionField