NULL
-terminated C strings), which may use Unicode encoding, and these may contain bytes with zeroes in them (high bytes of ASCII characters). typedef
OPAQUE_64_BITS
PDNameTree
;
void
PDNameTreeEnum(
PDNameTree
theTree
,
CosObjEnumProc
proc
,
void
*
clientData
);
theTree | IN/OUT A name tree.
|
proc | IN/OUT A procedure to call once for each name/object pair in
theTree . The obj/value pair in proc correspond to the Cos string and CosObj values of each leaf in the tree. |
clientData | IN/OUT Data used by the enumeration procedure.
clientData is passed to the enumeration procedure proc each time an entry is encountered. |
ASBool
PDNameTreeEqual(
PDNameTree
tree1
,
PDNameTree
tree2
);
tree1 | A name tree.
|
tree2 | Another name tree.
|
PDNameTree
PDNameTreeFromCosObj(
CosObj
obj
);
obj | IN/OUT The CosObj for which a PDNameTree representation is desired.
|
obj
. ASBool
PDNameTreeGet(
PDNameTree
theTree
,
const
char
*
name
,
ASInt32
nameLen
,
CosObj
*
value
);
theTree | The PDNameTree from which an object is retrieved.
|
name | The name of the object within
theTree to get. This is a Cos-style string, not a C string. |
nameLen | The length of
name . |
value | (Filled by the method) The Cos object corresponding to
name within theTree . |
CosObj
PDNameTreeGetCosObj(
PDNameTree
theTree
);
theTree | IN/OUT The PDNameTree for which a CosObj representation is desired.
|
theTree
. ASBool
PDNameTreeIsValid(
PDNameTree
theTree
);
theTree | The PDNameTree whose validity is desired.
|
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 the description of Name Trees in the ISO 32000-1:2008, Document Management-Portable Document Format-Part 1: PDF 1.7, section 7.9.6, page 88.
You can find this document on the web store of the International Standards Organization (ISO).
CosObj
PDNameTreeLookup(
CosObj
nameTree
,
char
*
string
,
ASInt32
stringLen
);
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
name is not a C-style string. Cos string objects can contain NULL chars. Standard C string-handling functions may not work as expected. |
stringLen | The length of
name in bytes. |
PDNameTree
PDNameTreeNew(
PDDoc
pdDoc
);
pdDoc | The document for which a new name tree is desired.
|
The newly created name tree or a NULL
CosObj if Acrobat is unable to create a PDNameTree for the document specified by pdDoc
.
PDNameTreeIsValid() should be called to determine if the name tree returned by PDNameTreeNew() is usable.
void
PDNameTreeNotifyNameAdded(
PDNameTree
theTree
,
CosObj
key
,
CosObj
value
);
theTree | The PDNameTree to which a name had been added.
|
key | The name of the object within
theTree that was added. This is a Cos string, not a C string. |
value | (Filled by the method) The Cos object corresponding to the object name that was added to
theTree . |
void
PDNameTreeNotifyNameRemoved(
PDNameTree
theTree
,
CosObj
removedName
);
theTree | The PDNameTree from which the name had been removed.
|
removedName | The name within
theTree that was removed. |
void
PDNameTreePut(
PDNameTree
theTree
,
CosObj
key
,
CosObj
value
);
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
key . |
void
PDNameTreeRemove(
PDNameTree
theTree
,
const
char
*
key
,
ASInt32
keyLen
);
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
key in bytes. |