typedef CosObj PDSElement;
ASBool EnumElementsWithUserPropertiesProc(PDSElement elem, PDSElement closestAncestorWithUserProperties, void *clientData);
elem | A PDS element that contains user properties, attributes, and classes.
|
closestAncestorWithUserProperties | The nearest PDS element above
elem in the structure tree that also contains user properties, attributes, and classes, or CosNewNull() if no such element exists. |
clientData | Client-supplied data passed in to PDDocEnumPDSElementsWithUserProperties() and PDSElementEnumKidsWithUserProperties().
|
ASBool PDSElementEnumUserPropertiesAsASTextProc(ASText propName, ASText propVal, void *clientData);
propName | The property's name.
|
propVal | The property's value, formatted for display.
|
clientData | Client-supplied data passed in to PDSElementEnumUserPropertiesAsASText().
|
ASBool PDSElementEnumUserPropertiesAsCosObjProc(CosObj propDict, void *clientData);
propDict | The property dictionary, containing the property's name and its value.
|
clientData | Client-supplied data passed in to PDSElementEnumUserPropertiesAsASText().
|
Tag
| Name
|
|---|---|
nodeTag | "xyz_Node" |
nodeNameTag | "xyz_NodeName" |
propTag | "xyz_Property" |
propNameTag | "xyz_PropertyName" |
propValTag | "xyz_Value" |
| |
|
ASBool PDDocEnumPDSElementsWithUserProperties(PDDoc doc, EnumElementsWithUserPropertiesProc proc, void *clientData);
doc | The PDDoc whose structure elements are to be enumerated.
|
proc | The procedure to call for each PDSElement found to have UserProperties.
|
clientData | Client-supplied data to be passed to the client callback.
|
Returns true if the document declares that it has structure elements that conform to the UserProperties attributes or class conventions.
This is based on both the presence of StructTreeRoot, and a value of "true" for the UserProperties key in the document's MarkInfo dictionary.
ASBool PDDocHasUserProperties(PDDoc doc);
doc | The PDDoc to be examined.
|
Associates the specified attribute object with an element at the element's current revision value.
This may raise various exceptions.
void PDSElementAddAttrObj(IN PDSElement element, IN PDSAttrObj attrObj);
element | The element with which
attrObj is associated. |
attrObj | The attribute object to associate with
element. |
Adds a class name to the element's list of classes to which it belongs at the element's current revision value.
This may raise various exceptions.
void PDSElementAddClass(IN PDSElement element, IN ASAtom classAtom);
element | IN/OUT The element to which a class is added.
|
classAtom | IN/OUT The ASAtom representing the class to add to
element. If classAtom is already present among the element parameter's classes, it will not be added again. |
void PDSElementClearID(IN PDSElement element);
element | The element whose ID is removed.
|
is raised if
element is not a valid PDSElement. | |
is raised if an error is found in the PDF file.
|
Creates a new (but empty) PDSElement.
This may raise various exceptions.
void PDSElementCreate(IN PDDoc pdDoc, OUT PDSElement *element);
pdDoc | The PDDoc in which the PDSElement is created.
|
element | (Filled by the method) The newly created PDSElement.
|
Enumerates PDSElement objects, beneath the supplied PDSElement, that have user properties attributes/classes.
The elements in a structure tree that have user properties form a virtual tree themselves; this procedure enumerates the children of the given structure element in this virtual tree. In other words, this procedure enumerates all the descendents( d) of the supplied structure element( e) such that PDSElementFindAncestorWithUserProperties(d) would return ( e). The enumeration continues as long as the callback returns true, and halts when the proc returns false or all virtual children have been enumerated.
ASBool PDSElementEnumKidsWithUserProperties(PDSElement elem, EnumElementsWithUserPropertiesProc proc, void *clientData);
elem | The PDSElement below which to search for elements with user properties.
|
proc | The client-supplied callback to call for each element found.
|
clientData | Client-supplied data to be passed to the client callback.
|
true, and halts when the proc returns false or all properties have been enumerated. ASBool PDSElementEnumUserPropertiesAsASText(PDSElement elem, PDSElementEnumUserPropertiesAsASTextProc proc, void *clientData, ASBool includeHidden);
elem | The PDSElement whose user properties will be enumerated.
|
proc | The callback that is called for each user property item.
|
clientData | Client-supplied data to be passed to the client callback.
|
includeHidden | A boolean value indicating whether the client wants to be given property items that are marked as hidden.
|
Enumerates the PDSElement object's user properties by traversing the list of attribute objects and class objects, calling the caller-supplied procedure for each entry in the properties array. The enumeration proc receives the property information as a Cos Dictionary. See the description of objects in the ISO 32000-1:2008, Document Management-Portable Document Format-Part 1: PDF 1.7, section 7.3, page 13.
You can find this document on the web store of the International Standards Organization (ISO).
ASBool PDSElementEnumUserPropertiesAsCosObj(PDSElement elem, PDSElementEnumUserPropertiesAsCosObjProc proc, void *clientData, ASBool includeHidden);
elem | The PDSElement whose user properties will be enumerated.
|
proc | The callback that is called for each user property item.
|
clientData | Client-supplied data to be passed to the client callback.
|
includeHidden | A boolean value indicating whether the client wants to be given property items that are marked as hidden.
|
ASErrorCode PDSElementExportUserProperties(PDSElement userPropsElement, ASBool wholeSubtree, ASBool includeHidden, ASBool flattenClasses, PDUserPropertiesXMLLabels xmlLabels, ASStm output);
userPropsElement | The element whose user properties are to be exported in XML format.
|
wholeSubtree | A boolean value indicating whether to export user properties of the whole structure tree which contains
userPropsElement, or just the subtree which starts from userPropsElement. |
includeHidden | A boolean value indicating whether the client wants to be given property items that are marked as hidden.
|
flattenClasses | A boolean value indicating whether to flatten the attribute classes for each structure element. If
true, the user properties for that class will be listed as properties for that stucture element. If false, the class will be listed for that structure element, and a list of classes and their properties will be listed near the end of the XML. |
xmlLabels | The XML tag/label information for exporting user properties. These labels are output as is. There is no XML escaping done. It is the caller's responsibility to make sure they conform to the XML standard.
|
output | The output stream to which user properties are written. The encoding of the characters is UTF-8.
|
0, it indicates success in exporting user properties; non-zero value indicates otherwise. PDSElement PDSElementFindAncestorWithUserProperties(PDSElement elem);
elem | The PDSElement at which to start searching upwards through the tree.
|
elem that contains UserProperties attributes or class information, or CosNull if none is found. Gets the actual text associated with the specified PDSElement. It returns the number of bytes in the text, or 0 if the element has no actual text or has an empty string.
To check for the existence of alternate text, check for a non-zero return value. To get the needed size of buffer, call this method with a NULL buffer.
Note: Due to implementation issues, make the buffer one byte larger than the required size. Code will not NULL-terminate the string correctly in the case of Unicode strings.
ASInt32 PDSElementGetActualText(IN PDSElement element, IN ASUns8 *buffer);
element | The structural element whose actual text is sought.
|
buffer |
0 if the element has no actual text. void PDSElementGetActualTextASText(PDSElement element, ASText text);
element | The element whose actual text is sought.
|
text | (Filled by the method) The text object containing the element's actual text. The client must pass a valid ASText object. The routine does not allocate it.
|
Gets the alternate text associated with an element.
It can first be called with a NULL buffer to find the size, so that buffer can then be appropriately sized.
Note: The Alt text can be legally defined as an empty string. To differentiate between an Alt text string of zero length and no Alt text being defined, call PDSElementHasAlt() first.
Note: Due to implementation issues, make the buffer one byte larger than the required size. The code will not NULL-terminate the string correctly in the case of Unicode strings.
ASInt32 PDSElementGetAlt(IN PDSElement element, IN ASUns8 *buffer);
element | The element whose alternate text is obtained.
|
buffer | (Filled by the method) A buffer into which the alternate text is placed. It may be
NULL, if the method is called only to find the length of the element's alternate text. If it is not NULL, buffer contains the element's actual text. The string is NULL-terminated (but not correctly for Unicode). This is not a C-style string, so normal string handling functions may not work; the buffer may contain a Unicode string. |
element parameter's alternate text. is raised if
element is not a valid PDSElement. |
void PDSElementGetAltASText(PDSElement element, ASText text);
element | The element whose alternate text is sought.
|
text | (Filled by the method) The text object containing the element's alternate text. The client must pass a valid ASText object. The routine does not allocate it.
|
is raised if
element is not a valid PDSElement. |
Gets the attribute object at a specified array index in the specified element.
If there is only one attribute object (that is, there is no array of attributes), and index is zero, that attribute object is obtained.
ASInt32 PDSElementGetAttrObj(IN PDSElement element, IN ASInt32 index, OUT PDSAttrObj *attrObj);
element | IN/OUT The element whose attribute is obtained.
|
index | IN/OUT The index of the attribute object to obtain.
|
attrObj | IN/OUT (Filled by the method) The attribute object at
index. |
element at time of last association. is raised if
element is not a valid PDSElement. |
Gets the class name at an array index in the specified element.
If there is only one attribute object (that is, there is no array), and index is zero, that class name is obtained.
ASInt32 PDSElementGetClass(IN PDSElement element, IN ASInt32 index, OUT ASAtom *classAtom);
element | The element whose class is obtained.
|
index | The index of the class to obtain.
|
classAtom | (Filled by the method) The ASAtom describing the class.
|
element at the time of the last association. is raised if
element is not a valid PDSElement. |
CosObj PDSElementGetCosObj(PDSElement element);
element | The element object whose Cos object is obtained.
|
Gets the Cos object for the page of the first kid of the element.
This may throw various exceptions.
Note: The order in which the returned page is first is the order of kids, not the order of pages. That is, the first descendant with page content determines which page is returned.
CosObj PDSElementGetFirstPage(IN PDSElement pdsElement, OUT ASAtom *firstKidType, OUT CosObj *firstCosObjKidOnAPage, OUT PDEContainer *firstMCKidOnAPage);
pdsElement | IN/OUT The element whose kid's first page is found.
|
firstKidType | IN/OUT (Filled by the method) A pointer to an ASAtom for the name that appears as the Type entry of the actual first kid of
element. Possible values are the values that PDSElementGetKid() can return. Pass NULL to inhibit setting firstKidType. |
firstCosObjKidOnAPage | |
firstMCKidOnAPage |
ASInt32 PDSElementGetID(IN PDSElement pdsElement, OUT ASUns8 *idBuf);
pdsElement | The element whose ID is obtained.
|
idBuf | (Filled by the method) A pointer to the buffer containing the element's ID.
|
is raised if
element is not a valid PDSElement. | |
is raised if an error is found in the PDF file.
|
Gets the kid at an array index in the specified element.
A PDF structural element, unlike the structure tree root, can have several different kinds of children: marked content, another element, or an entire PDF object. The parameter in which the kid is placed depends on the type of kid. If the kid is a structural element or an object reference, PDSElementGetKid() places the result in cosObjKid; if the kid is page content, it is placed in pointerKid.
Any or all of cosObjKid, pointerKid, and cosPage can be NULL to get the kid's type without setting that parameter.
Note: When the kid is an MC, it is actually a pointer of the type PDEContainer. As with all PDFEdit objects, you must be careful to manage the reference count of the object by calling PDEAcquire() and PDERelease(). PDSElementGetKid() does not call PDEAcquire() for you.
Note: This method cannot access marked content inside a Form XObject.
ASAtom PDSElementGetKid(IN PDSElement element, IN ASInt32 index, OUT CosObj *cosObjKid, OUT void **pointerKid, OUT CosObj *cosPage);
element | The element whose specified kid is found.
|
index | The index of the kid to obtain.
|
cosObjKid | (Filled by the method) The CosObj of the specified kid, if that kid is a PDSElement or an OBJR. If
cosObjKid is NULL, it is not filled in, but the type of the kid is returned regardless. Note that this CosObj can be treated as a PDSElement or a PDSObjR. Use the return type to decide which to use. |
pointerKid | (Filled by the method) A pointer to the kid at
index, if that kid is an MC. If pointerKid is NULL, it is not filled in, but the type of the kid is returned regardless. |
cosPage |
is raised if
element is not a valid PDSElement. | |
is raised if an error is found in the PDF file.
|
mcid as well as or instead of the actual object. Note: This method cannot access marked content inside a Form XObject.
ASAtom PDSElementGetKidEx(IN PDSElement element, IN ASInt32 index, OUT CosObj *cosObjKid, OUT ASInt32 *mcid, OUT void **pointerKid, OUT CosObj *cosPage);
element | The PDSElement containing the kid that is retrieved.
|
index | The index of the kid.
|
cosObjKid | (Filled in by method) The kid being accessed (depending on the kid's type) or
NULL. |
mcid | (Filled in by method) The kid's
mcid or NULL. |
pointerKid | (Filled in by method) A pointer to the kid, or
NULL. |
cosPage |
is raised if
element is not a valid PDSElement. | |
is raised if an error is found in the PDF file.
|
ASAtom PDSElementGetKidWithMCInfo(PDSElement element, ASInt32 index, CosObj *cosObjKid, PDSMCInfoP mcidInfo, void **pointerKid, CosObj *cosPage);
element | The PDSElement containing the kid that is retrieved.
|
index | The index of the kid.
|
cosObjKid | (Filled in by method) The kid being accessed (depending on the kid's type), or
NULL. |
mcidInfo | (Filled in by method) The kid's information object, or
NULL. |
pointerKid | (Filled in by method) A pointer to the kid, or
NULL. |
cosPage |
is raised if
element is not a valid PDSElement. | |
is raised if an error is found in the PDF file.
|
Gets the language associated with the specified PDSElement.
It returns the number of bytes in the language string, or 0 if the element has no language or has an empty string.
To check for the existence of expansion text, call PDSElementHasLanguage(). To get the needed buffer size, call this method with a NULL buffer.
Note: Due to implementation issues, make the buffer one byte larger than the required size. Code will not NULL-terminate the string correctly in the case of Unicode strings.
ASInt32 PDSElementGetLanguage(IN PDSElement element, IN ASUns8 *buffer);
element | The structural element whose expansion text is sought.
|
buffer | (Filled by the method) A buffer containing the element's expansion text, or
NULL. See PDSElementSetLanguage() for format and languages. If not NULL, buffer contains the element's expansion text. The string is NULL-terminated (but not correctly for Unicode). This is not a C-style string, so normal string handling functions may not work; the buffer may contain a Unicode string. |
ASInt32 PDSElementGetNumAttrObjs(IN PDSElement element);
element | IN/OUT The element whose number of attributes is obtained.
|
element. is raised if
element is not a valid PDSElement. |
ASInt32 PDSElementGetNumClasses(IN PDSElement element);
element | The element whose number of classes is obtained.
|
element belongs. is raised if
element is not a valid PDSElement. |
ASInt32 PDSElementGetNumKids(IN PDSElement element);
element | IN/OUT The element whose number of kids is obtained.
|
element. is raised if
element is not a valid PDSElement. |
Gets the immediate ancestor element of the specified element in the tree.
If the element's parent is another element, parent is set to that parent and parentIsTreeRoot is set to false. If the element's parent is the structure tree root, parent is set to CosNull and parentIsTreeRoot is set to true. If parentIsTreeRoot is NULL, it is not set.
void PDSElementGetParent(IN PDSElement element, OUT PDSElement *parent, OUT ASBool *parentIsTreeRoot);
element | The element whose parent is obtained.
|
parent | (Filled by the method) The element's parent.
|
parentIsTreeRoot | (Filled by the method) The element's parent is the structure tree root.
|
is raised if
element is not a valid PDSElement. |
ASInt32 PDSElementGetRevision(IN PDSElement element);
element | IN/OUT The element whose revision is obtained.
|
element. is raised if
element is not a valid PDSElement. |
ASBool PDSElementGetStructTreeRoot(IN PDSElement element, OUT PDSTreeRoot *treeRoot);
element | The element whose title is obtained.
|
treeRoot | (Filled by the method) The structure tree root.
|
true if the document has a structure tree root, false otherwise. If there is a structure tree root, it sets treeRoot to be the structure tree root. is raised if
element is not a valid PDSElement. |
Gets the title of the specified element, returning the number of bytes in the title.
It can first be called with a NULL buffer to find the title size, so that buffer can be appropriately sized as one greater than the title's length.
Note: Due to implementation issues, make the buffer one byte larger than the required size.
ASInt32 PDSElementGetTitle(IN PDSElement element, OUT ASUns8 *buffer);
element | IN/OUT The element whose title is obtained.
|
buffer | IN/OUT (Filled by the method) A buffer into which the title text is placed. It may be
NULL, in which case the number of bytes in the title is returned. |
element parameter's title, or zero if element has no title. is raised if
element is not a valid PDSElement. |
void PDSElementGetTitleASText(PDSElement element, ASText title);
element | The element whose title is sought.
|
title | (Filled by the method) The text object containing the title. The client must pass a valid ASText object. The routine does not allocate it.
|
is raised if
element is not a valid PDSElement. |
Gets the element's structural element type. The type corresponds to the Subtype key in the structure element dictionary.
PDSElementGetType() gets the value of the Subtype key (not the Type key) in the structure element dictionary. All PDSElement objects have a Type value of StructElem.
ASAtom PDSElementGetType(IN PDSElement element);
element | The element whose structural element type is obtained.
|
is raised if
element is not a valid PDSElement. |
ASBool PDSElementHasActualText(IN PDSElement element);
element | The PDSElement being tested.
|
ASBool PDSElementHasAlt(IN PDSElement element);
element | The PDSElement being tested.
|
ASBool PDSElementHasLanguage(IN PDSElement element);
element | The PDSElement being tested.
|
true if the PDSElement has attribute objects or class objects with an owner of UserProperties. ASBool PDSElementHasUserProperties(PDSElement elem);
elem | The PDSElement to examine.
|
Increments an element's revision count by one.
This may raise various exceptions.
void PDSElementIncrementRevision(IN PDSElement element);
element | The element whose revision count is incremented.
|
insertAfter. void PDSElementInsertKid(IN PDSElement element, IN PDSElement kid, IN ASInt32 insertAfter);
element | The element in which the specified kid is inserted.
|
kid | The kid to insert.
|
insertAfter | The position after which the kid is inserted. If
element currently has no kids, insertAfter is ignored. |
Inserts a reference to the specified PDSMC (marked content) in the specified element after position insertAfter.
This method automatically creates MCR objects if needed.
This may raise various exceptions.
void PDSElementInsertMCAsKid(IN PDSElement element, IN CosObj cosPage, IN PDSMC mc, IN ASInt32 insertAfter);
element | The element in which the reference is inserted.
|
cosPage | The CosObj for the page containing the reference to insert.
|
mc | The marked content to insert.
|
insertAfter | The position after which the reference is inserted. If
element currently has no kids, insertAfter is ignored. |
Extends PDSElementInsertMCAsKid(), inserting content that is in a stream other than a page content stream. This function is the same as PDSElementInsertStmMCAsKid().
This may raise various exceptions.
void PDSElementInsertMCAsKidEx(IN PDSElement element, IN CosObj cosPage, IN PDSMC mc, IN ASInt32 insertAfter, IN CosObj cosStream, IN CosObj streamOwner);
element | The element in which the reference is inserted.
|
cosPage | The CosObj for the page containing the reference to insert.
|
mc | The marked content to insert.
|
insertAfter | The position after which the reference is inserted. If
element currently has no kids, insertAfter is ignored. |
cosStream | The stream containing the content given by
mc. |
streamOwner | A Cos object to record as the owner of the content. It can be CosNull if the owner is not important.
|
Takes a marked content reference and places the content that it identifies in the structure as a child of the element.
This may raise various exceptions.
Note: the content reference handle will be filled out automatically if PDPageSetPDEContent(), PDEFormSetContent(), or PDEGroupSetContent() is called. Otherwise, PDEContentSetPage() or PDEContentSetContainingStmAndOwner() must be called explicitly.
ASBool PDSElementInsertMCRefAsKid(IN PDSElement element, IN PDSMCRef ref, IN ASInt32 insertAfter);
element | The structure element with which to associate marked content.
|
ref | The marked content reference describing the content on the page. It must have had a valid MCID, and must have been completed by subsequent content stream processing calls.
|
insertAfter | The position after which the marked content is inserted into the element's kids. If the element has no children,
insertAfter is ignored. |
Inserts a reference to the specified PDF object as a kid into the specified element.
This may raise various exceptions.
void PDSElementInsertOBJAsKid(IN PDSElement element, IN CosObj cosPage, IN CosObj obj, IN ASInt32 insertAfter);
element | IN/OUT The element in which the reference is inserted.
|
cosPage | IN/OUT The CosObj for the page containing the reference to insert.
|
obj | IN/OUT The CosObj to insert.
|
insertAfter | IN/OUT The position after which the reference is inserted in
element. If element currently has no kids, insertAfter is ignored. |
Inserts a marked content sequence from a non-page-content stream as a kid of the specified element.
This may raise various exceptions.
void PDSElementInsertStmMCAsKid(PDSElement element, CosObj cosPage, CosObj containingStm, CosObj stmOwner, PDSMC mc, ASInt32 insertAfter);
element | The element in which the reference is inserted.
|
cosPage | The CosObj for the page containing the reference to insert.
|
containingStm | The stream containing the content given by
mc. |
stmOwner | The PDF object owning the stream given in
cosStream (for example, the annotation to which an appearance stream belongs). It can be CosNull if the owner is not important. |
mc | The marked content to insert.
|
insertAfter | The position after which the reference is inserted. If
element currently has no kids, insertAfter is ignored. |
void PDSElementRemoveAllAttrObjs(IN PDSElement element);
element | The element whose attributes are removed.
|
is raised if
element is not a valid PDSElement. |
void PDSElementRemoveAllClasses(IN PDSElement element);
element | IN/OUT The element whose classes are removed.
|
is raised if
element is not a valid PDSElement. |
element does not have an attrObj attribute, this method does nothing. Note: Calling PDSElementRemoveAttrObj() while iterating over the attribute objects of an element will change the relationship between the attribute object indices and attribute objects. Although it is possible to track this change in indices in a single loop, it is more straightforward to accumulate a list of attribute objects to remove during one pass over the attribute objects and to carry out the actual removals during a subsequent iteration over the accumulated list.
void PDSElementRemoveAttrObj(IN PDSElement element, IN PDSAttrObj attrObj);
element | The element whose attribute is removed.
|
attrObj | The attribute object to remove.
|
Note: Calling PDSElementRemoveClass() while iterating over the classes of an element will change the relationship between class indices and classes. Although it is possible to track this change in indices in a single loop, it is more straightforward to accumulate a list of classes to remove during one pass over the classes and to carry out the actual removals during a subsequent iteration over the accumulated list.
void PDSElementRemoveClass(IN PDSElement element, IN ASAtom classAtom);
element | The element from which the specified class is removed.
|
classAtom | The ASAtom representing the class to remove.
|
is raised if
element is not a valid PDSElement. |
Removes the specified kid from an element.
This may raise various exceptions.
Note: The approved method of removing OBJ kids is PDSElementRemoveKidOBJ().
void PDSElementRemoveKid(IN PDSElement element, IN CosObj kid);
element | The element whose kid is removed.
|
kid | The kid to remove.
|
Removes the specified PDSMC (marked content) from an element's kids, if it has any.
After calling this method, use PDPageSetPDEContent() to commit any changes that have been made to the page contents.
This may raise various exceptions.
void PDSElementRemoveKidMC(IN PDSElement element, IN CosObj cosPage, IN PDSMC mc);
element | The element whose reference is removed.
|
cosPage | The CosObj for the page containing the reference to remove.
|
mc | The marked content to remove.
|
Removes an OBJ from among the kids of a given element. It does nothing if the given OBJ is not a kid of the given element.
This may raise various exceptions.
void PDSElementRemoveKidOBJ(IN PDSElement element, IN CosObj kid);
element | The element whose kid is having an OBJ removed.
|
kid | The kid whose OBJ is removed.
|
Replaces the specified kid in the specified element.
This may raise various exceptions.
Note: The approved method of replacing OBJ kids is PDSElementReplaceKidOBJ().
void PDSElementReplaceKid(IN PDSElement element, IN CosObj oldKid, IN CosObj newKid);
element | IN/OUT The element whose kid is replaced.
|
oldKid | IN/OUT The kid to replace.
|
newKid | IN/OUT The kid that is replacing
oldKid. |
void PDSElementReplaceKidMC(IN PDSElement element, IN CosObj oldCosPage, IN PDSMC oldMC, IN CosObj newCosPage, IN PDSMC newMC);
element | The element whose reference is replaced.
|
oldCosPage | The CosObj for the page holding the reference to replace.
|
oldMC | The marked content to replace.
|
newCosPage | The CosObj for the page holding the reference that is replacing
oldMC. |
newMC | The marked content that is replacing
oldMC. |
Replaces oldObj with newObj on the specified page in the specified element.
This may raise various exceptions.
void PDSElementReplaceKidOBJ(IN PDSElement element, IN CosObj oldObj, IN CosObj newObj, IN CosObj newPage);
element | IN/OUT The element whose object is replaced.
|
oldObj | IN/OUT The object to replace.
|
newObj | IN/OUT The object that is replacing
oldObj. |
newPage | IN/OUT The CosObj for the page holding the reference that is replacing
oldObj. |
buffer (from 0 to nBytes). void PDSElementSetActualText(IN PDSElement element, IN const ASUns8 *buffer, IN ASInt32 nBytes);
element | The PDSElement whose contents are being set to
buffer. |
buffer | The buffer to which the PDSElement object's contents are being set.
|
nBytes | The number of bytes in the text representation.
|
void PDSElementSetActualTextASText(PDSElement element, const ASText text);
element | The element whose content is being set.
|
text | The text object containing the string to be made the element's actual text.
|
void PDSElementSetAlt(IN PDSElement element, IN const ASUns8 *buffer, IN ASInt32 nBytes);
element | IN/OUT The element whose alternate text representation is set.
|
buffer | IN/OUT A pointer to a buffer containing a string to be made the element's alternate text representation.
|
nBytes | IN/OUT The number of bytes in
buffer to use as the element parameter's new alternate text representation. It may be zero. It sets an Alt string even if the buffer length is zero, but such an Alt string looks like no Alt string according to PDSElementGetAlt(). |
is raised if
element is not a valid PDSElement. |
void PDSElementSetAltASText(PDSElement element, const ASText text);
element | The element whose alternate text representation is being set.
|
text | The text object containing the string to be set as the element's alternate text representation.
|
Raises
| pdsErrWrongTypeParameter if element is not a valid PDSElement.
|
void PDSElementSetID(IN PDSElement element, IN const ASUns8 *buffer, IN ASInt32 nBytes);
element | The element whose ID is set.
|
buffer | A pointer to a buffer containing a string to be made the element's ID.
|
nBytes | The number of bytes in
buffer to use as the element parameter's new ID. It may be zero. It sets an ID even if the buffer length is zero, but such an ID looks like no ID according to PDSElementGetID(). |
is raised if another element already has the ID as its ID.
| |
is raised if
element is not a valid PDSElement. |
buffer parameter's contents (from 0 to nBytes). Note: IANA registered language codes can be found at http://www.isi.edu.
Note: The IETF Standard for Language Element Values (RFC 1766) can be found at http://www.ietf.org/rfc/rfc1766.txt?number=1766.
void PDSElementSetLanguage(IN PDSElement element, IN const ASUns8 *buffer, IN ASInt32 nBytes);
element | The PDSElement whose language field is set to
buffer. |
buffer | A pointer to a buffer containing a string to be made the element's language field. The empty string indicates that the language is unknown. The string should be in the format
IETF RFC-1766-language-code>. Note that the ISO 639 language codes can be found at http://lcweb.loc.gov/standards/iso639-2. |
nBytes | The size of
buffer. It may be zero. It sets the language even if the buffer length is zero, but such a language setting looks like no language according to PDSElementGetLanguage. |
void PDSElementSetTitle(IN PDSElement element, IN const ASUns8 *buffer, IN ASInt32 nBytes);
element | IN/OUT The element whose title is set.
|
buffer | IN/OUT A pointer to a buffer containing a string to be made the element's title.
|
nBytes | IN/OUT The number of bytes in
buffer to use as the element parameter's new title. It may be zero. It sets a title even if the buffer length is zero, but such a title looks like no title according to PDSElementGetTitle(). |
is raised if
element is not a valid PDSElement. |
void PDSElementSetTitleASText(PDSElement element, const ASText title);
element | The element whose title is being set.
|
title | The text object containing the string to be made the element's title.
|
Raises
| pdsErrWrongTypeParameter if element is not a valid PDSElement.
|
Sets an element's type value to the specified type. The type corresponds to the Subtype key in the structure element dictionary.
PDSElementSetType() sets the value of the Subtype key, not the Type key, in the structure element dictionary. All PDSElement objects have a Type value of StructElem.
void PDSElementSetType(IN PDSElement element, IN ASAtom type);
element | The element whose type is set.
|
type | The ASAtom representing the element's type.
|
is raised if
element is not a valid PDSElement. |
Gets the parent element of the specified PDF object.
This may throw various exceptions.
void PDSOBJGetParent(IN CosObj obj, OUT PDSElement *parent);
obj | IN/OUT The PDF object whose parent element is obtained. It must be referred to via an OBJR from some element (that is, it has a
struct parent key), otherwise it is undefined. |
parent | IN/OUT (Filled by the method) The parent element of
obj. |