DL Logo

PDCollection Enumerations

PDCollectionSplitTypes

Header: PDExpT.h:7023

Description

Collection split types.

Value options for PDCollectionSplitType.

Enum Constants

kCollectionSplitDefault=0x2000
Default split based on view.
kCollectionSplitHorizontal
Split vertical.
kCollectionSplitVertical
Split horizontal.
kCollectionSplitNone
No split; show the navigator.
kCollectionSplitPreview
No split; show the preview.

PDCollectionViewTypes

Header: PDExpT.h:7012

Description

Collection view types.

Value options for PDCollectionViewType.

Enum Constants

kCollectionViewTile=0x1000
Tile navigator.
kCollectionViewDetails
Details navigator.
kCollectionViewCustom
Custom navigator.

PDCollection Typedefs

PDCollection

Header: PDExpT.h:7000

Description

A PDCollection represents a collection dictionary in a PDF file.

Collection view types and split types are unusual. A straight mapping of the View key and the Split key would result in the key/value of /View/H being part of the view type enumeration, but that would result in ambiguity when setting View to H and Split to N ( /View/H maps to "preview" in Acrobat 8, but /Split/N is documented to map to "no split, show navigator" in Acrobat 9. Because of this, and the fact that /View/H is really interpreted as a kind of split rather than a style of navigator, Preview was moved to the split type enumeration in the API. This interacts with the underlying file as follows: when a /View/H value is read it is mapped to "Tile" and "Preview" for the navigator style and split position. When the Tile/Preview combination is written out, it is recorded back to /View/H for consistency with Acrobat 8.

Related Methods

Syntax

typedef OPAQUE_64_BITS PDCollection;

Returned From

Used By

PDCollectionSplitType

Header: PDExpT.h:7035

Description

Collection split types.

For value options see PDCollectionSplitTypes.

Syntax

typedef ASUns16 PDCollectionSplitType;

Used In

PDCollectionViewType

Header: PDExpT.h:7020

Description

Collection view types.

For value options see PDCollectionViewTypes.

Syntax

typedef ASUns16 PDCollectionViewType;

Used In

PDNavigator

Header: PDExpT.h:7009

Description

Opaque object representing a collection navigator dictionary.

Syntax

typedef OPAQUE_64_BITS PDNavigator;

Used In

PDCollection Structures

_t_PDCollectionField

Header: PDExpT.h:7068

Description

A structure corresponding to a field in the collection schema.

Syntax

struct _t_PDCollectionField {
ASSize_t size;
The size of the PDCollectionFieldRec.
ASAtom fieldName;
The ID of the field.
ASInt32 index;
The 0-based index of the field in the PDCollectionSchema.
ASAtom subtype;
The subtype of the field. For example /N represents a number and /S represents a string.
ASText fieldText;
The name to use in the user interface.
ASBool visible;
Default visibility.
ASBool canEdit;
} PDCollectionFieldRec;

Used By

_t_PDCollectionViewDataRec

Header: PDExpT.h:7038

Description

Collection view data record.

Syntax

struct _t_PDCollectionViewDataRec {
ASSize_t size;
The size of the PDCollectionViewDataRec.
The view type of the collection.
PDNavigator navigator;
The navigator to use with the collection. This is ignored if view != custom.
The split type of the collection.
ASInt32 splitPos;
A percentage from 0-100. It is ignored if the position is not a split view. If the position is a split view,-1 indicates an application-defined position.
} PDCollectionViewDataRec;

Used By

PDCollection Functions

PDCollectionCreateFolder

Header: PDProcs.h:12483

Description

Creates a new folder.

Syntax

PDFolder PDCollectionCreateFolder(PDCollection collection, ASConstText path);

Parameters

collection
The collection that will be associated with the new folder.
path

The path and name of the folder. The path syntax for folders takes the form [parent/]folder, where the mandatory parent/ section may be repeated as necessary to provide a complete path to the new folder. The path is always interpreted as being relative to the root level of the folder hierarchy. Paths that specify simply a new folder name are located in the root folder. The character set for folder names is limited. Folders may not contain any of the characters in the set

/ \: ? * " < > |

and may not end with a. (period). Please note that a folder name cannot consist entirely of spaces. To specify the root folder itself, assign a value of "/".

Returns

The new folder object.

PDCollectionGetFolder

Header: PDProcs.h:12501

Description

Gets an existing folder.

Syntax

PDFolder PDCollectionGetFolder(PDCollection collection, ASConstText path);

Parameters

collection
The collection associated with the folder to be obtained.
path
The path to the folder. To specify the root folder itself, assign a value of "/". The path syntax for folders takes the form [parent/]folder, where the mandatory parent/ section may be repeated as necessary to provide a complete path to the new folder.

Returns

The specified folder. If the folder does not exist, the returned folder is invalid.

PDCollectionGetInitialStyle

Header: PDProcs.h:12514

Description

Gets the initial style dictionary for the collection.

Syntax

ASBool PDCollectionGetInitialStyle(PDCollection collection, ASCab style);

Parameters

collection
The collection object.
style
Dictionary to set

Returns

true if the dictionary is present, if false the passed cabinet is unchanged

PDCollectionGetSortOrder

Header: PDProcs.h:12392

Description

Gets the contents of the collection sort dictionary.

Syntax

ASArraySize PDCollectionGetSortOrder(PDCollection collection, PDCollectionSchemaSortPairRec *pairs, ASArraySize arrayLen);

Parameters

collection
The collection object.
pairs
The array of pairs. It may be NULL.
arrayLen
The length of the pairs array.

Returns

If pairs is NULL, the number of items in the collection sort dictionary is returned; otherwise, the number of items stored in the pairs array is returned.

PDCollectionGetViewData

Header: PDProcs.h:12407

Description

Gets the view data for the collection.

Syntax

void PDCollectionGetViewData(PDCollection collection, PDCollectionViewDataRec *data);

Parameters

collection
The collection object.
data
The collection view data.

PDCollectionIsValid

Header: PDProcs.h:12365

Description

Determines if a collection is valid.

Syntax

ASBool PDCollectionIsValid(PDCollection collection);

Parameters

collection
The collection

Returns

true if the collection is valid, false otherwise.

PDCollectionRemoveFolder

Header: PDProcs.h:12491

Description

Removes a folder and its descendant folders and associated file attachments.

Syntax

void PDCollectionRemoveFolder(PDCollection collection, ASConstText path);

Parameters

collection
The collection associated with the folder that will be removed.
path
The path to the folder.

Returns

0 if the folder hierarchy was successfully removed; otherwise an error code identifying the failure condition is returned.

PDCollectionRemoveInitialStyle

Header: PDProcs.h:12519

Description

Removes the initial style dictionary from a collect, if present

Syntax

void PDCollectionRemoveInitialStyle(PDCollection collection);

Parameters

collection
The collection object.

PDCollectionSetInitialStyle

Header: PDProcs.h:12507

Description

Sets the initial style dictionary for the collection.

Syntax

void PDCollectionSetInitialStyle(PDCollection collection, ASConstCab style);

Parameters

collection
The collection object.
style
Dictionary to fill

PDCollectionSetSortOrder

Header: PDProcs.h:12400

Description

Set the contents of the collection sort dictionary.

Syntax

void PDCollectionSetSortOrder(PDCollection collection, const PDCollectionSchemaSortPairRec *pairs, ASArraySize arrayLen);

Parameters

collection
The collection object.
pairs
The array of pairs. If it is NULL, the collection sort dictionary is removed.
arrayLen
The length of the pairs array.

PDCollectionSetViewData

Header: PDProcs.h:12413

Description

Set the view data for the collection.

Syntax

void PDCollectionSetViewData(PDCollection collection, const PDCollectionViewDataRec *data);

Parameters

collection
The collection object.
data
The collection view data.