DynaPDF Manual - Page 252

Previous Page 251   Index   Next Page 253

Function Reference
Page 252 of 839
The container PDF should always consist of only one page that displays the compatibility message
as described above and shown in the demo projects. Collections which are created in this way are
very suitable for merging multiple collections into one file. If the container PDF is a normal PDF file,
many advantages of collections are lost. Especially merging of such files is then as difficult as with
normal PDF files.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
CreateCollectionField
Syntax:
SI32 pdfCreateCollectionField(
const PPDF* IPDF,
// Instance pointer
TColColumnType ColType, // Data type for the column
SI32 Column,
// Column index or -1, see below
const char* Name,
// Column name to be displayed in the viewer
const char* Key,
// Key to find the data for that column
LBOOL Visible,
// If false, the column is not displayed
LBOOL Editable)
// If true, the column is editable
typedef enum
{
cisCreationDate, // Predefined column, no collection item required
cisDescription,
// Predefined column, no collection item required
cisFileName,
// Predefined column, no collection item required
cisModDate,
// Predefined column, no collection item required
cisSize,
// Predefined column, no collection item required
cisCustomDate,
// User defined date
cisCustomNumber, // User defined number
cisCustomString
// User defined string
}TColColumnType;
The function creates a user defined collection field. A collection field represents a column in the list
view of the user interface of a PDF 1.7 compliant PDF viewer. The parameter ColType defines the
type of the column that should be added to the list. Predefined columns are already available in the
embedded files file specification dictionaries; there is no need to create collection items for these
fields.
User defined fields are available for three basic data types depending on the value that should be
stored in the collection item. User defined column types require always relating collection items in
all embedded files file specification dictionaries. A collection item holds the data that should be
displayed in a given column. See also CreateColItemDate(), CreateColItemNumber(),
CreateColItemString().
The parameter Name represents the column name that should be displayed in the list view of the
viewer application. The parameter Key is used to find the value for the column in the embedded files
file specification dictionaries. It should be defined as a 7 bit ASCII string without any special
character. The key is also required to create the relating collection items for the embedded files.
 

Previous topic: CreateCollection

Next topic: CreateComboBox