Xojo Conferences
XDCMay2019MiamiUSA
MBSOct2019CologneDE

DynaPDF Manual - Page 226

Previous Page 225   Index   Next Page 227

Function Reference
Page 226 of 766
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. Make
sure that you use exactly the same key to create the collection items and that the right data type is
used.
Use the function SetColSortField() to sort the list of embedded files by a specific collection field.
It is usually best to check the validity of the collection with CheckCollection() after it was fully
created. This is especially important if multiple collections were merged into one file.
The order in which collection fields and collections items are created can be arbitrary. The collection
items can be created before the collection fields and vice versa.
Remarks:
This function is implemented in an Ansi and Unicode compatible variant. The relationship between
collection fields and collection items is explained in more detail under CreateCollection(). DynaPDF
contains also example projects which demonstrate how collection fields and items can be created.
Use the function CheckCollection() to determine whether the connection between collection fields
and collection items is valid.
Return values:
If the function succeeds the return value is the handle of the collection field, a value greater or equal
zero. If the function fails the return value is a negative error code.
 

Previous topic: CreateCollectionField

Next topic: CreateComboBox