Layer | PDSEdit_Layer |
Object | PDSElement |
PDSElement is the basic building block of the structure tree. It represents PDF structural elements, which are nodes in a tree, defining a PDF document's logical structure.
Typedef | ||
---|---|---|
PDSElement
Represents PDF structural elements, which are nodes in a tree giving a PDF document's logical structure.
|
Callback | ||
---|---|---|
PDSElementEnumUserPropertiesAsASTextProc
Callback for PDSElementEnumUserPropertiesAsASText().
|
||
PDSElementEnumUserPropertiesAsCosObjProc
A callback for PDSElementEnumUserPropertiesAsCosObj().
|
Method | ||
---|---|---|
Associates the specified attribute object with an element at the element's current revision value.
|
||
Adds a class name to the element's list of classes to which it belongs at the element's current revision value.
|
||
void PDSElementClearID(INPDSElement element)
Removes an element's ID, if it exists.
|
||
Creates a new (but empty) PDSElement.
|
||
ASBool PDSElementEnumKidsWithUserProperties(PDSElement elem, EnumElementsWithUserPropertiesProc proc, void* clientData)
Enumerates PDSElement objects, beneath the supplied PDSElement, that have user properties attributes/classes.
|
||
ASBool PDSElementEnumUserPropertiesAsASText(PDSElement elem, PDSElementEnumUserPropertiesAsASTextProc proc, void* clientData, ASBool includeHidden)
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 pair of ASText objects, for the property name and the property value. The enumeration continues as long as the callback returns true, and halts when the proc returns false or all properties have been enumerated.
|
||
ASBool PDSElementEnumUserPropertiesAsCosObj(PDSElement elem, PDSElementEnumUserPropertiesAsCosObjProc proc, void* clientData, ASBool includeHidden)
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, with contents as described in the PDF Reference. The enumeration continues as long as the callback returns true, and halts when the proc returns false or all properties have been enumerated.
|
||
ASErrorCode PDSElementExportUserProperties(PDSElement userPropsElement, ASBool wholeSubtree, ASBool includeHidden, ASBool flattenClasses, PDUserPropertiesXMLLabels xmlLabels, ASStm output)
Exports user properties of the specified PDSElement in XML.
|
||
PDSElement PDSElementFindAncestorWithUserProperties(PDSElement elem)
Starting at the supplied structure element, this procedure follows the chain of parents (see PDSElementGetParent()) until a structure element is found that has user properties. If no such element is found (for example, the chain ended at the structure tree root), CosNull is returned.
|
||
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.
|
||
Gets the actual text associated with the specified PDSElement as an ASText object.
|
||
Gets the alternate text associated with an element.
|
||
Gets the alternate text associated with the specified PDSElement as an ASText object.
|
||
Gets the attribute object at a specified array index in the specified element.
|
||
Gets the class name at an array index in the specified element.
|
||
CosObj PDSElementGetCosObj(PDSElement element)
Gets the Cos object corresponding to the specified element object. This method does not copy the object, but is instead the logical equivalent of a type cast.
|
||
CosObj PDSElementGetFirstPage(INPDSElement pdsElement, OUTASAtom* firstKidType, OUTCosObj* firstCosObjKidOnAPage, OUTPDEContainer* firstMCKidOnAPage)
Gets the Cos object for the page of the first kid of the element.
|
||
Gets the ID of an element, or CosObjNull if there is no ID set.
|
||
ASAtom PDSElementGetKid(INPDSElement element, INASInt32 index, OUTCosObj* cosObjKid, OUT void** pointerKid, OUTCosObj* cosPage)
Gets the kid at an array index in the specified element.
|
||
ASAtom PDSElementGetKidEx(INPDSElement element, INASInt32 index, OUTCosObj* cosObjKid, OUTASInt32* mcid, OUT void** pointerKid, OUTCosObj* cosPage)
Functions identically to PDSElementGetKid(), but for children that are marked contents can return the mcid as well as or instead of the actual object.
|
||
ASAtom PDSElementGetKidWithMCInfo(PDSElement element, ASInt32 index, CosObj* cosObjKid, PDSMCInfoP mcidInfo, void** pointerKid, CosObj* cosPage)
Functions identically to PDSElementGetKidEx(), but returns additional information about marked content kids that are in streams other than the page content streams.
|
||
Gets the language associated with the specified PDSElement.
|
||
ASInt32 PDSElementGetNumAttrObjs(INPDSElement element)
Gets the number of attribute objects directly attached to the specified element.
|
||
ASInt32 PDSElementGetNumClasses(INPDSElement element)
Gets the number of classes to which the specified element belongs.
|
||
ASInt32 PDSElementGetNumKids(INPDSElement element)
Gets the number of kids of the specified element.
|
||
Gets the immediate ancestor element of the specified element in the tree.
|
||
ASInt32 PDSElementGetRevision(INPDSElement element)
Gets the revision number of an element.
|
||
Gets the structure tree root of the document containing element.
|
||
Gets the title of the specified element, returning the number of bytes in the title.
|
||
Gets the title associated with the specified PDSElement as an ASText object.
|
||
ASAtom PDSElementGetType(INPDSElement element)
Gets the element's structural element type. The type corresponds to the Subtype key in the structure element dictionary.
|
||
ASBool PDSElementHasActualText(INPDSElement element)
Tests whether ActualText is defined for a given PDSElement.
|
||
ASBool PDSElementHasAlt(INPDSElement element)
Tests whether Alt text is defined for a given PDSElement.
|
||
ASBool PDSElementHasLanguage(INPDSElement element)
Tests whether a language string is defined for a given PDSElement.
|
||
ASBool PDSElementHasUserProperties(PDSElement elem)
Returns true if the PDSElement has attribute objects or class objects with an owner of UserProperties.
|
||
void PDSElementIncrementRevision(INPDSElement element)
Increments an element's revision count by one.
|
||
Inserts the specified kid PDSElement object into the specified element after position insertAfter.
|
||
void PDSElementInsertMCAsKid(INPDSElement element, INCosObj cosPage, INPDSMC mc, INASInt32 insertAfter)
Inserts a reference to the specified PDSMC (marked content) in the specified element after position insertAfter.
|
||
void PDSElementInsertMCAsKidEx(INPDSElement element, INCosObj cosPage, INPDSMC mc, INASInt32 insertAfter, INCosObj cosStream, INCosObj streamOwner)
Extends PDSElementInsertMCAsKid(), inserting content that is in a stream other than a page content stream. This function is the same as PDSElementInsertStmMCAsKid().
|
||
Takes a marked content reference and places the content that it identifies in the structure as a child of the element.
|
||
void PDSElementInsertOBJAsKid(INPDSElement element, INCosObj cosPage, INCosObj obj, INASInt32 insertAfter)
Inserts a reference to the specified PDF object as a kid into the specified element.
|
||
void PDSElementInsertStmMCAsKid(PDSElement element, CosObj cosPage, CosObj containingStm, CosObj stmOwner, PDSMC mc, ASInt32 insertAfter)
Inserts a marked content sequence from a non-page-content stream as a kid of the specified element.
|
||
void PDSElementRemoveAllAttrObjs(INPDSElement element)
Removes all attribute objects directly associated with the specified element.
|
||
void PDSElementRemoveAllClasses(INPDSElement element)
Removes all classes from the specified element.
|
||
Removes the specified attribute object from an element. If element does not have an attrObj attribute, this method does nothing.
|
||
Removes the specified class name from the element's list of classes to which it belongs.
|
||
Removes the specified kid from an element.
|
||
Removes the specified PDSMC (marked content) from an element's kids, if it has any.
|
||
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.
|
||
Replaces the specified kid in the specified element.
|
||
void PDSElementReplaceKidMC(INPDSElement element, INCosObj oldCosPage, INPDSMC oldMC, INCosObj newCosPage, INPDSMC newMC)
Replaces the specified PDSMC (on oldCosPage) with a new PDSMC (on newCosPage) in the specified element.
|
||
void PDSElementReplaceKidOBJ(INPDSElement element, INCosObj oldObj, INCosObj newObj, INCosObj newPage)
Replaces oldObj with newObj on the specified page in the specified element.
|
||
Sets the actual text representation of the specified PDSElement object's contents to buffer (from 0 to nBytes).
|
||
Sets an element's actual text.
|
||
Sets the alternate text representation of an element's contents.
|
||
Sets the alternate text representation of an element's contents (ASText version of PDSElementSetAlt).
|
||
Sets the ID of an element to the given Cos string.
|
||
Sets the language field associated with the PDSElement to the buffer parameter's contents (from 0 to nBytes).
|
||
Sets an element's title.
|
||
Sets an element's title.
|
||
Sets an element's type value to the specified type. The type corresponds to the Subtype key in the structure element dictionary.
|
PDSElement |
Product availability: All |
Platform availability: All |
typedef CosObj PDSElement;
Represents PDF structural elements, which are nodes in a tree giving a PDF document's logical structure.
See Also
File: PDSExpT.h |
Line: 84 |
PDSElementEnumUserPropertiesAsASTextProc |
Product availability: All |
Platform availability: All |
ASBool (*PDSElementEnumUserPropertiesAsASTextProc)(ASText propName, ASText propVal, void *clientData)
Callback for PDSElementEnumUserPropertiesAsASText().
File: PDSExpT.h |
Line: 242 |
PDSElementEnumUserPropertiesAsCosObjProc |
Product availability: All |
Platform availability: All |
A callback for PDSElementEnumUserPropertiesAsCosObj().
File: PDSExpT.h |
Line: 252 |
PDSElementAddAttrObj | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementAddAttrObj(INPDSElement element, INPDSAttrObj attrObj)
Associates the specified attribute object with an element at the element's current revision value.
This may raise various exceptions.
Parameters
element — | The element with which |
|
attrObj — | The attribute object to associate with |
See Also
Since
File: PDSWriteProcs.h |
Line: 273 |
PDSElementAddClass | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementAddClass(INPDSElement element, INASAtom classAtom)
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.
Parameters
element — | IN/OUT The element to which a class is added. |
|
classAtom — | IN/OUT The ASAtom representing the class to add to |
See Also
Since
File: PDSWriteProcs.h |
Line: 326 |
PDSElementClearID | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementClearID(INPDSElement element)
Removes an element's ID, if it exists.
Parameters
element — | The element whose ID is removed. |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSWriteProcs.h |
Line: 584 |
PDSElementCreate | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementCreate(INPDDoc pdDoc, OUTPDSElement* element)
Creates a new (but empty) PDSElement.
This may raise various exceptions.
Parameters
pdDoc — | The PDDoc in which the PDSElement is created. |
|
element — | (Filled by the method) The newly created PDSElement. |
Since
File: PDSWriteProcs.h |
Line: 214 |
PDSElementEnumKidsWithUserProperties | () |
Product availability: All |
Platform availability: All |
ASBool PDSElementEnumKidsWithUserProperties(PDSElement elem, EnumElementsWithUserPropertiesProc proc, void* clientData)
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.
Parameters
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. |
|
See Also
Since
File: PDSReadProcs.h |
Line: 996 |
PDSElementEnumUserPropertiesAsASText | () |
Product availability: All |
Platform availability: All |
ASBool PDSElementEnumUserPropertiesAsASText(PDSElement elem, PDSElementEnumUserPropertiesAsASTextProc proc, void* clientData, ASBool includeHidden)
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 pair of ASText objects, for the property name and the property value. The enumeration continues as long as the callback returns true
, and halts when the proc returns false
or all properties have been enumerated.
Parameters
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. |
|
See Also
Since
File: PDSReadProcs.h |
Line: 932 |
PDSElementEnumUserPropertiesAsCosObj | () |
Product availability: All |
Platform availability: All |
ASBool PDSElementEnumUserPropertiesAsCosObj(PDSElement elem, PDSElementEnumUserPropertiesAsCosObjProc proc, void* clientData, ASBool includeHidden)
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, with contents as described in the PDF Reference. The enumeration continues as long as the callback returns true
, and halts when the proc returns false
or all properties have been enumerated.
Parameters
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. |
|
See Also
Since
File: PDSReadProcs.h |
Line: 956 |
PDSElementExportUserProperties | () |
Product availability: All |
Platform availability: All |
ASErrorCode PDSElementExportUserProperties(PDSElement userPropsElement, ASBool wholeSubtree, ASBool includeHidden, ASBool flattenClasses, PDUserPropertiesXMLLabels xmlLabels, ASStm output)
Exports user properties of the specified PDSElement in XML.
Parameters
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 |
|
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 |
|
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. |
An ASErrorCode to indicate the success of exporting user properties in XML format. If ASErrorCode is |
See Also
Since
File: PDSReadProcs.h |
Line: 1072 |
PDSElementFindAncestorWithUserProperties | () |
Product availability: All |
Platform availability: All |
PDSElement PDSElementFindAncestorWithUserProperties(PDSElement elem)
Starting at the supplied structure element, this procedure follows the chain of parents (see PDSElementGetParent()) until a structure element is found that has user properties. If no such element is found (for example, the chain ended at the structure tree root), CosNull is returned.
Parameters
elem — | The PDSElement at which to start searching upwards through the tree. |
The first ancestor of |
See Also
Since
File: PDSReadProcs.h |
Line: 970 |
PDSElementGetActualText | () |
Product availability: All |
Platform availability: All |
ASInt32 PDSElementGetActualText(INPDSElement element, INASUns8* buffer)
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.
Parameters
element — | The structural element whose actual text is sought. |
|
buffer — | If not |
An ASInt32 representing the number of bytes in the text, or |
See Also
Since
File: PDSReadProcs.h |
Line: 698 |
PDSElementGetActualTextASText | () |
Product availability: All |
Platform availability: All |
void PDSElementGetActualTextASText(PDSElement element, ASText text)
Gets the actual text associated with the specified PDSElement as an ASText object.
Parameters
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. |
See Also
Since
File: PDSReadProcs.h |
Line: 1026 |
PDSElementGetAlt | () |
Product availability: All |
Platform availability: All |
ASInt32 PDSElementGetAlt(INPDSElement element, INASUns8* buffer)
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.
Parameters
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 |
The number of bytes in the |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 345 |
PDSElementGetAltASText | () |
Product availability: All |
Platform availability: All |
void PDSElementGetAltASText(PDSElement element, ASText text)
Gets the alternate text associated with the specified PDSElement as an ASText object.
Parameters
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. |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 1044 |
PDSElementGetAttrObj | () |
Product availability: All |
Platform availability: All |
ASInt32 PDSElementGetAttrObj(INPDSElement element, INASInt32 index, OUTPDSAttrObj* attrObj)
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.
Parameters
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 |
The revision number of |
See Also
Exceptions
Since
File: PDSReadProcs.h |
Line: 274 |
PDSElementGetClass | () |
Product availability: All |
Platform availability: All |
ASInt32 PDSElementGetClass(INPDSElement element, INASInt32 index, OUTASAtom* classAtom)
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.
Parameters
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. |
The revision number of |
See Also
Exceptions
Since
File: PDSReadProcs.h |
Line: 312 |
PDSElementGetCosObj | () |
Product availability: All |
Platform availability: All |
CosObj PDSElementGetCosObj(PDSElement element)
Gets the Cos object corresponding to the specified element object. This method does not copy the object, but is instead the logical equivalent of a type cast.
Parameters
element — | The element object whose Cos object is obtained. |
The dictionary Cos object for the element object. |
Since
File: PDSReadProcs.h |
Line: 855 |
PDSElementGetFirstPage | () |
Product availability: All |
Platform availability: All |
CosObj PDSElementGetFirstPage(INPDSElement pdsElement, OUTASAtom* firstKidType, OUTCosObj* firstCosObjKidOnAPage, OUTPDEContainer* firstMCKidOnAPage)
Gets the Cos object for the page of the first kid of the element.
This may throw various exceptions.
Parameters
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 |
|
firstCosObjKidOnAPage — | IN/OUT (Filled by the method) The kid whose content determined that the page returned was the first page with content, if that kid is a CosObj. Pass |
|
firstMCKidOnAPage — | IN/OUT (Filled by the method) The kid whose content determined that the page returned was the first page with content, if that kid is marked content that is not a CosObj. Pass |
The CosObj of the page found, CosObjNull if the element has no page content. |
See Also
Since
File: PDSReadProcs.h |
Line: 450 |
PDSElementGetID | () |
Product availability: All |
Platform availability: All |
ASInt32 PDSElementGetID(INPDSElement pdsElement, OUTASUns8* idBuf)
Gets the ID of an element, or CosObjNull if there is no ID set.
Parameters
pdsElement — | The element whose ID is obtained. |
|
idBuf — | (Filled by the method) A pointer to the buffer containing the element's ID. |
The number of bytes in the ID, or zero if the element has no ID. |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 470 |
PDSElementGetKid | () |
Product availability: All |
Platform availability: All |
ASAtom PDSElementGetKid(INPDSElement element, INASInt32 index, OUTCosObj* cosObjKid, OUT void** pointerKid, OUTCosObj* cosPage)
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.
Parameters
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 |
|
pointerKid — | (Filled by the method) A pointer to the kid at |
|
cosPage — | (Filled by the method) A pointer to the CosObj of the page containing the kid. If |
The ASAtom representing the kid's Type value: StructElem, MC, or OBJR. MCR is never returned. |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 414 |
PDSElementGetKidEx | () |
Product availability: All |
Platform availability: All |
ASAtom PDSElementGetKidEx(INPDSElement element, INASInt32 index, OUTCosObj* cosObjKid, OUTASInt32* mcid, OUT void** pointerKid, OUTCosObj* cosPage)
Functions identically to PDSElementGetKid(), but for children that are marked contents can return the mcid
as well as or instead of the actual object.
Parameters
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 |
|
mcid — | ||
pointerKid — | (Filled in by method) A pointer to the kid, or |
|
cosPage — | (Filled in by method) The CosObj of the page containing the kid, or |
An ASAtom representing the Type value of the kid. See above. |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 671 |
PDSElementGetKidWithMCInfo | () |
Product availability: All |
Platform availability: All |
ASAtom PDSElementGetKidWithMCInfo(PDSElement element, ASInt32 index, CosObj* cosObjKid, PDSMCInfoP mcidInfo, void** pointerKid, CosObj* cosPage)
Functions identically to PDSElementGetKidEx(), but returns additional information about marked content kids that are in streams other than the page content streams.
Parameters
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 |
|
mcidInfo — | (Filled in by method) The kid's information object, or |
|
pointerKid — | (Filled in by method) A pointer to the kid, or |
|
cosPage — | (Filled in by method) The CosObj of the page containing the kid, or |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 791 |
PDSElementGetLanguage | () |
Product availability: All |
Platform availability: All |
ASInt32 PDSElementGetLanguage(INPDSElement element, INASUns8* buffer)
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.
Parameters
element — | The structural element whose expansion text is sought. |
|
buffer — | (Filled by the method) A buffer containing the element's expansion text, or |
An ASInt32 representing the number of bytes in the language string. |
See Also
Since
File: PDSReadProcs.h |
Line: 729 |
PDSElementGetNumAttrObjs | () |
Product availability: All |
Platform availability: All |
ASInt32 PDSElementGetNumAttrObjs(INPDSElement element)
Gets the number of attribute objects directly attached to the specified element.
Parameters
element — | IN/OUT The element whose number of attributes is obtained. |
The number of attribute objects directly attached to |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 247 |
PDSElementGetNumClasses | () |
Product availability: All |
Platform availability: All |
ASInt32 PDSElementGetNumClasses(INPDSElement element)
Gets the number of classes to which the specified element belongs.
Parameters
element — | The element whose number of classes is obtained. |
The number of classes to which |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 287 |
PDSElementGetNumKids | () |
Product availability: All |
Platform availability: All |
ASInt32 PDSElementGetNumKids(INPDSElement element)
Gets the number of kids of the specified element.
Parameters
element — | IN/OUT The element whose number of kids is obtained. |
The number of direct kids of |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 357 |
PDSElementGetParent | () |
Product availability: All |
Platform availability: All |
void PDSElementGetParent(INPDSElement element, OUTPDSElement* parent, OUTASBool* parentIsTreeRoot)
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.
Parameters
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. |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 197 |
PDSElementGetRevision | () |
Product availability: All |
Platform availability: All |
ASInt32 PDSElementGetRevision(INPDSElement element)
Gets the revision number of an element.
Parameters
element — | IN/OUT The element whose revision is obtained. |
The revision number of |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 233 |
PDSElementGetStructTreeRoot | () |
Product availability: All |
Platform availability: All |
ASBool PDSElementGetStructTreeRoot(INPDSElement element, OUTPDSTreeRoot* treeRoot)
Gets the structure tree root of the document containing element.
Parameters
element — | The element whose title is obtained. |
|
treeRoot — | (Filled by the method) The structure tree root. |
|
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 487 |
PDSElementGetTitle | () |
Product availability: All |
Platform availability: All |
ASInt32 PDSElementGetTitle(INPDSElement element, OUTASUns8* buffer)
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.
Parameters
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 |
The number of bytes in the |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 221 |
PDSElementGetTitleASText | () |
Product availability: All |
Platform availability: All |
void PDSElementGetTitleASText(PDSElement element, ASText title)
Gets the title associated with the specified PDSElement as an ASText object.
Parameters
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. |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 1012 |
PDSElementGetType | () |
Product availability: All |
Platform availability: All |
ASAtom PDSElementGetType(INPDSElement element)
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.
Parameters
element — | The element whose structural element type is obtained. |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSReadProcs.h |
Line: 170 |
PDSElementHasActualText | () |
Product availability: All |
Platform availability: All |
ASBool PDSElementHasActualText(INPDSElement element)
Tests whether ActualText is defined for a given PDSElement.
Parameters
element — | The PDSElement being tested. |
|
Since
File: PDSReadProcs.h |
Line: 750 |
PDSElementHasAlt | () |
Product availability: All |
Platform availability: All |
ASBool PDSElementHasAlt(INPDSElement element)
Tests whether Alt text is defined for a given PDSElement.
Parameters
element — | The PDSElement being tested. |
|
See Also
Since
File: PDSReadProcs.h |
Line: 740 |
PDSElementHasLanguage | () |
Product availability: All |
Platform availability: All |
ASBool PDSElementHasLanguage(INPDSElement element)
Tests whether a language string is defined for a given PDSElement.
Parameters
element — | The PDSElement being tested. |
|
Since
File: PDSReadProcs.h |
Line: 760 |
PDSElementHasUserProperties | () |
Product availability: All |
Platform availability: All |
ASBool PDSElementHasUserProperties(PDSElement elem)
Returns true
if the PDSElement has attribute objects or class objects with an owner of UserProperties.
Parameters
elem — | The PDSElement to examine. |
ASBool indicating that some attribute objects or class objects have an owner of UserProperties. |
Since
File: PDSReadProcs.h |
Line: 908 |
PDSElementIncrementRevision | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementIncrementRevision(INPDSElement element)
Increments an element's revision count by one.
This may raise various exceptions.
Parameters
element — |
Since
File: PDSWriteProcs.h |
Line: 258 |
PDSElementInsertKid | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementInsertKid(INPDSElement element, INPDSElement kid, INASInt32 insertAfter)
Inserts the specified kid PDSElement object into the specified element after position insertAfter
.
Parameters
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 |
See Also
Exceptions
Since
File: PDSWriteProcs.h |
Line: 404 |
PDSElementInsertMCAsKid | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementInsertMCAsKid(INPDSElement element, INCosObj cosPage, INPDSMC mc, INASInt32 insertAfter)
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.
Parameters
element — | The element in which the reference is inserted. |
|
cosPage — | ||
mc — | The marked content to insert. |
|
insertAfter — | The position after which the reference is inserted. If |
See Also
Since
File: PDSWriteProcs.h |
Line: 431 |
PDSElementInsertMCAsKidEx | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementInsertMCAsKidEx(INPDSElement element, INCosObj cosPage, INPDSMC mc, INASInt32 insertAfter, INCosObj cosStream, INCosObj streamOwner)
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.
Parameters
element — | The element in which the reference is inserted. |
|
cosPage — | ||
mc — | The marked content to insert. |
|
insertAfter — | The position after which the reference is inserted. If |
|
cosStream — | The stream containing the content given by |
|
streamOwner — | A Cos object to record as the owner of the content. It can be CosNull if the owner is not important. |
See Also
Since
File: PDSWriteProcs.h |
Line: 833 |
PDSElementInsertMCRefAsKid | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
ASBool PDSElementInsertMCRefAsKid(INPDSElement element, INPDSMCRef ref, INASInt32 insertAfter)
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.
Parameters
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, |
See Also
Since
File: PDSWriteProcs.h |
Line: 953 |
PDSElementInsertOBJAsKid | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementInsertOBJAsKid(INPDSElement element, INCosObj cosPage, INCosObj obj, INASInt32 insertAfter)
Inserts a reference to the specified PDF object as a kid into the specified element.
This may raise various exceptions.
Parameters
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 |
See Also
Since
File: PDSWriteProcs.h |
Line: 453 |
PDSElementInsertStmMCAsKid | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementInsertStmMCAsKid(PDSElement element, CosObj cosPage, CosObj containingStm, CosObj stmOwner, PDSMC mc, ASInt32 insertAfter)
Inserts a marked content sequence from a non-page-content stream as a kid of the specified element.
This may raise various exceptions.
Parameters
element — | The element in which the reference is inserted. |
|
cosPage — | ||
containingStm — | The stream containing the content given by |
|
stmOwner — | The PDF object owning the stream given in |
|
mc — | The marked content to insert. |
|
insertAfter — | The position after which the reference is inserted. If |
See Also
Since
File: PDSWriteProcs.h |
Line: 866 |
PDSElementRemoveAllAttrObjs | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementRemoveAllAttrObjs(INPDSElement element)
Removes all attribute objects directly associated with the specified element.
Parameters
element — | The element whose attributes are removed. |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSWriteProcs.h |
Line: 308 |
PDSElementRemoveAllClasses | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementRemoveAllClasses(INPDSElement element)
Removes all classes from the specified element.
Parameters
element — | IN/OUT The element whose classes are removed. |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSWriteProcs.h |
Line: 364 |
PDSElementRemoveAttrObj | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementRemoveAttrObj(INPDSElement element, INPDSAttrObj attrObj)
Removes the specified attribute object from an element. If element
does not have an attrObj
attribute, this method does nothing.
Parameters
element — | The element whose attribute is removed. |
|
attrObj — | The attribute object to remove. |
See Also
Exceptions
element
is not a valid PDSElement or attrObj
is not a valid attribute object. Since
File: PDSWriteProcs.h |
Line: 297 |
PDSElementRemoveClass | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementRemoveClass(INPDSElement element, INASAtom classAtom)
Removes the specified class name from the element's list of classes to which it belongs.
Parameters
element — | The element from which the specified class is removed. |
|
classAtom — |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSWriteProcs.h |
Line: 351 |
PDSElementRemoveKid | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementRemoveKid(INPDSElement element, INCosObj kid)
Removes the specified kid from an element.
This may raise various exceptions.
Parameters
element — | The element whose kid is removed. |
|
kid — | The kid to remove. |
See Also
Since
File: PDSWriteProcs.h |
Line: 470 |
PDSElementRemoveKidMC | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementRemoveKidMC(INPDSElement element, INCosObj cosPage, INPDSMC mc)
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.
Parameters
element — | The element whose reference is removed. |
|
cosPage — | ||
mc — | The marked content to remove. |
See Also
Since
File: PDSWriteProcs.h |
Line: 490 |
PDSElementRemoveKidOBJ | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementRemoveKidOBJ(INPDSElement element, INCosObj kid)
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.
Parameters
element — | The element whose kid is having an OBJ removed. |
|
kid — | The kid whose OBJ is removed. |
See Also
Since
File: PDSWriteProcs.h |
Line: 800 |
PDSElementReplaceKid | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementReplaceKid(INPDSElement element, INCosObj oldKid, INCosObj newKid)
Replaces the specified kid in the specified element.
This may raise various exceptions.
Parameters
element — | IN/OUT The element whose kid is replaced. |
|
oldKid — | IN/OUT The kid to replace. |
|
newKid — | IN/OUT The kid that is replacing |
See Also
Since
File: PDSWriteProcs.h |
Line: 510 |
PDSElementReplaceKidMC | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementReplaceKidMC(INPDSElement element, INCosObj oldCosPage, INPDSMC oldMC, INCosObj newCosPage, INPDSMC newMC)
Replaces the specified PDSMC (on oldCosPage
) with a new PDSMC (on newCosPage
) in the specified element.
This may raise various exceptions.
Parameters
element — | The element whose reference is replaced. |
|
oldCosPage — | ||
oldMC — | The marked content to replace. |
|
newCosPage — | The CosObj for the page holding the reference that is replacing |
|
newMC — | The marked content that is replacing |
See Also
Since
File: PDSWriteProcs.h |
Line: 530 |
PDSElementReplaceKidOBJ | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementReplaceKidOBJ(INPDSElement element, INCosObj oldObj, INCosObj newObj, INCosObj newPage)
Replaces oldObj
with newObj
on the specified page in the specified element.
This may raise various exceptions.
Parameters
element — | IN/OUT The element whose object is replaced. |
|
oldObj — | IN/OUT The object to replace. |
|
newObj — | IN/OUT The object that is replacing |
|
newPage — | IN/OUT The CosObj for the page holding the reference that is replacing |
See Also
Since
File: PDSWriteProcs.h |
Line: 551 |
PDSElementSetActualText | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementSetActualText(INPDSElement element, const ASUns8* buffer, INASInt32 nBytes)
Sets the actual text representation of the specified PDSElement object's contents to buffer
(from 0
to nBytes
).
Parameters
element — | The PDSElement whose contents are being set to |
|
buffer — | The buffer to which the PDSElement object's contents are being set. |
|
nBytes — | The number of bytes in the text representation. |
See Also
Since
File: PDSWriteProcs.h |
Line: 762 |
PDSElementSetActualTextASText | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementSetActualTextASText(PDSElement element, const ASText text)
Sets an element's actual text.
Parameters
element — | The element whose content is being set. |
|
text — | The text object containing the string to be made the element's actual text. |
See Also
Since
File: PDSWriteProcs.h |
Line: 983 |
PDSElementSetAlt | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementSetAlt(INPDSElement element, const ASUns8* buffer, INASInt32 nBytes)
Sets the alternate text representation of an element's contents.
Parameters
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 |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSWriteProcs.h |
Line: 384 |
PDSElementSetAltASText | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementSetAltASText(PDSElement element, const ASText text)
Sets the alternate text representation of an element's contents (ASText version of PDSElementSetAlt).
Parameters
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. |
See Also
Exceptions
Since
File: PDSWriteProcs.h |
Line: 999 |
PDSElementSetID | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementSetID(INPDSElement element, const ASUns8* buffer, INASInt32 nBytes)
Sets the ID of an element to the given Cos string.
Parameters
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 |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSWriteProcs.h |
Line: 571 |
PDSElementSetLanguage | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementSetLanguage(INPDSElement element, const ASUns8* buffer, INASInt32 nBytes)
Sets the language field associated with the PDSElement to the buffer
parameter's contents (from 0 to nBytes).
Parameters
element — | The PDSElement whose language field is set to |
|
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 |
|
nBytes — | The size of |
See Also
Since
File: PDSWriteProcs.h |
Line: 784 |
PDSElementSetTitle | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementSetTitle(INPDSElement element, const ASUns8* buffer, INASInt32 nBytes)
Sets an element's title.
Parameters
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 |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSWriteProcs.h |
Line: 248 |
PDSElementSetTitleASText | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementSetTitleASText(PDSElement element, const ASText title)
Sets an element's title.
Parameters
element — | The element whose title is being set. |
|
title — | The text object containing the string to be made the element's title. |
See Also
Exceptions
Since
File: PDSWriteProcs.h |
Line: 969 |
PDSElementSetType | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDSElementSetType(INPDSElement element, INASAtom type)
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.
Parameters
element — | The element whose type is set. |
|
type — |
See Also
Exceptions
element
is not a valid PDSElement. Since
File: PDSWriteProcs.h |
Line: 232 |