| Layer | PD_Layer |
| Object | PDNameTree |
A PDNameTree is used to map Cos strings to Cos objects, just as a Cos dictionary is used to map Cos names to Cos objects. However, a name tree can have many more entries than a Cos dictionary. You can create a PDNameTree and locate it where appropriate (perhaps under a page, but most often right under the catalog). A PDNameTree is used to store the named destination information.
Name trees use Cos-style strings, which may use Unicode encoding, rather than
NULL-terminated C strings. Unicode encoding may contain bytes with zeroes in them
(the high bytes of ASCII characters).
| Typedef | ||
|---|---|---|
| PDNameTree
The dictionary used to store all of the Named Destinations in a PDF file. A name tree is used to map Cos strings to Cos objects just as a Cos dictionary is used to map Cos names to Cos objects. However, a name tree can have many more entries than a Cos dictionary can. You create a PDNameTree and locate it where you think is appropriate (perhaps under a page, but most often right under the catalog). Name trees use Cos-style strings (not NULL-terminated C strings), which may use Unicode encoding, and these may contain bytes with zeroes in them (high bytes of ASCII characters).
|
||
| Method | ||
|---|---|---|
|
Enumerates the entries in the tree.
|
||
|
Compares two name trees to determine if they are the same object.
|
||
|
PDNameTree PDNameTreeFromCosObj(CosObj obj)
Creates a type cast of the CosObj to a name tree. This does not copy the object.
|
||
|
Retrieves an object from the name tree.
|
||
|
CosObj PDNameTreeGetCosObj(PDNameTree theTree)
Creates a type cast of the name tree to a CosObj. This does not copy the object.
|
||
|
ASBool PDNameTreeIsValid(PDNameTree theTree)
Validates whether a PDNameTree is a CosDict Cos object.
|
||
|
Given a name tree (such as the Dests tree in the Names dictionary) and a string, find the CosObj in the tree that matches the string.
|
||
|
An entry was added to a name tree.
|
||
|
An entry was removed from a name tree.
|
||
|
An entry will be removed from the PDNameTree.
|
||
|
PDNameTree PDNameTreeNew(PDDoc pdDoc)
Creates a new name tree in the document.
|
||
|
Sends a PDNameTreeNameAdded() notification.
|
||
|
Sends a PDNameTreeNameRemoved() notification.
|
||
|
Puts a new entry in the name tree. If an entry with this name is already in the tree, it is replaced.
|
||
|
Removes the specified object from the tree. It does nothing if no object with that name exists.
|
||
| PDNameTree |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
typedef OPAQUE_64_BITS PDNameTree;
The dictionary used to store all of the Named Destinations in a PDF file. A name tree is used to map Cos strings to Cos objects just as a Cos dictionary is used to map Cos names to Cos objects. However, a name tree can have many more entries than a Cos dictionary can. You create a PDNameTree and locate it where you think is appropriate (perhaps under a page, but most often right under the catalog). Name trees use Cos-style strings (not NULL-terminated C strings), which may use Unicode encoding, and these may contain bytes with zeroes in them (high bytes of ASCII characters).
See Also
| File: PDExpT.h |
| Line: 5438 |
| PDNameTreeEnum | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
void PDNameTreeEnum(PDNameTree theTree, CosObjEnumProc proc, void* clientData)
Enumerates the entries in the tree.
Parameters
theTree — | IN/OUT A name tree. |
|
proc — | IN/OUT A procedure to call once for each name/object pair in |
|
clientData — | IN/OUT Data used by the enumeration procedure. |
See Also
Since
| File: PDProcs.h |
| Line: 6896 |
| PDNameTreeEqual | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
ASBool PDNameTreeEqual(PDNameTree tree1, PDNameTree tree2)
Compares two name trees to determine if they are the same object.
Parameters
tree1 — | A name tree. |
|
tree2 — | Another name tree. |
|
See Also
Since
| File: PDProcs.h |
| Line: 6826 |
| PDNameTreeFromCosObj | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
PDNameTree PDNameTreeFromCosObj(CosObj obj)
Creates a type cast of the CosObj to a name tree. This does not copy the object.
Parameters
obj — | IN/OUT The CosObj for which a PDNameTree representation is desired. |
A PDNameTree representation of |
See Also
Since
| File: PDProcs.h |
| Line: 6788 |
| PDNameTreeGet | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
ASBool PDNameTreeGet(PDNameTree theTree, const char* name, ASInt32 nameLen, CosObj* value)
Retrieves an object from the name tree.
Parameters
theTree — | The PDNameTree from which an object is retrieved. |
|
name — | The name of the object within |
|
nameLen — | ||
value — | (Filled by the method) The Cos object corresponding to |
|
See Also
Since
| File: PDProcs.h |
| Line: 6861 |
| PDNameTreeGetCosObj | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
CosObj PDNameTreeGetCosObj(PDNameTree theTree)
Creates a type cast of the name tree to a CosObj. This does not copy the object.
Parameters
theTree — | IN/OUT The PDNameTree for which a CosObj representation is desired. |
A CosObj representation of |
See Also
Since
| File: PDProcs.h |
| Line: 6801 |
| PDNameTreeIsValid | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
ASBool PDNameTreeIsValid(PDNameTree theTree)
Validates whether a PDNameTree is a CosDict Cos object.
Parameters
theTree — | The PDNameTree whose validity is desired. |
|
See Also
Since
| File: PDProcs.h |
| Line: 6814 |
| PDNameTreeLookup | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
Given a name tree (such as the Dests tree in the Names dictionary) and a string, find the CosObj in the tree that matches the string.
See Section 3.8.5 in the PDF Reference for more information on name trees.
Parameters
nameTree — | The name tree in which to search. |
|
string — | The name to search for. The name tree uses Cos-style strings, which may use Unicode encoding, and these may contain bytes with zeroes in them (high bytes of ASCII characters). Note that |
|
stringLen — |
The Cos object associated with the specified name, which is the array element following the name. |
See Also
Since
| File: PDProcs.h |
| Line: 6115 |
| PDNameTreeNameAdded | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
void PDNameTreeNameAdded(PDNameTree NameTree, CosObj Key, CosObj Value, void* clientData)
An entry was added to a name tree.
Parameters
NameTree — | The name tree to which an entry was added. |
|
Key — | The Cos object of the key for the entry. This object is a Cos integer. |
|
Value — | The Cos object for the value associated with key. |
|
clientData — | A pointer to a block of user-supplied data that was passed in by the calling application when this notification was registered for using |
See Also
Notifications
| File: PIPokes.h |
| Line: 1684 |
| PDNameTreeNameRemoved | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
void PDNameTreeNameRemoved(PDNameTree NameTree, CosObj Key, void* clientData)
An entry was removed from a name tree.
Parameters
NameTree — | The name tree from which an entry was removed. |
|
Key — | The Cos object of the key for the entry. This object is a Cos integer. |
|
clientData — | A pointer to a block of user-supplied data that was passed in by the calling application when this notification was registered for using |
See Also
Notifications
| File: PIPokes.h |
| Line: 1698 |
| PDNameTreeNameWillRemove | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
void PDNameTreeNameWillRemove(PDNameTree tree, const char* key, ASInt32 keyLen, void* clientData)
An entry will be removed from the PDNameTree.
Parameters
tree |
|
key |
|
keyLen |
|
clientData |
| File: PIPokes.h |
| Line: 2587 |
| PDNameTreeNew | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
PDNameTree PDNameTreeNew(PDDoc pdDoc)
Creates a new name tree in the document.
Parameters
pdDoc — |
The newly created name tree or a PDNameTreeIsValid() should be called to determine if the name tree returned by PDNameTreeNew() is usable. |
See Also
Since
| File: PDProcs.h |
| Line: 6775 |
| PDNameTreeNotifyNameAdded | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
void PDNameTreeNotifyNameAdded(PDNameTree theTree, CosObj key, CosObj value)
Sends a PDNameTreeNameAdded() notification.
Parameters
theTree — | The PDNameTree to which a name had been added. |
|
key — | The name of the object within |
|
value — | (Filled by the method) The Cos object corresponding to the object name that was added to |
See Also
Notifications
Since
| File: PDProcs.h |
| Line: 7826 |
| PDNameTreeNotifyNameRemoved | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
void PDNameTreeNotifyNameRemoved(PDNameTree theTree, CosObj removedName)
Sends a PDNameTreeNameRemoved() notification.
Parameters
theTree — | The PDNameTree from which the name had been removed. |
|
removedName — | The name within |
See Also
Notifications
Since
| File: PDProcs.h |
| Line: 7837 |
| PDNameTreePut | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
void PDNameTreePut(PDNameTree theTree, CosObj key, CosObj value)
Puts a new entry in the name tree. If an entry with this name is already in the tree, it is replaced.
Parameters
theTree — | IN/OUT The name tree for which a new entry is added. |
|
key — | IN/OUT The name of the object to put in the tree. This is a Cos-style string, not a C string. This allows the use of an existing indirect object for the key rather than forcing the creation of a new object. |
|
value — | IN/OUT The Cos object to be associated with |
See Also
Notifications
Since
| File: PDProcs.h |
| Line: 6844 |
| PDNameTreeRemove | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
void PDNameTreeRemove(PDNameTree theTree, const char* key, ASInt32 keyLen)
Removes the specified object from the tree. It does nothing if no object with that name exists.
Parameters
theTree — | IN/OUT The name tree from which an entry is removed. |
|
key — | IN/OUT The name of the entry to remove. This is a Cos- style string, not a C string. |
|
keyLen — | IN/OUT The length of |
See Also
Notifications
Since
| File: PDProcs.h |
| Line: 6877 |