Layer

PDSEdit Layer

7 components134 items
101 Functions 20 Definitions 11 Typedefs 1 Structures 1 Enums

General

22 items

Typedefs(1)

Enums(1)

PDSType

PDSExpT.h:164

PDS object types.

Values
kPDSElement
kPDSAttrObj
kPDSMCR
kPDSMC
kPDSRoleMap
kPDSClassMap
kPDSLastType

Definitions(20)

IN

PDSExpT.h:46

OUT

PDSExpT.h:47

PDSAttrObj

5 items

Functions(4)

PDSAttrObjCreate

void PDSAttrObjCreate(IN PDDoc pdDoc, IN ASAtom owner, IN ASBool indirect, OUT PDSAttrObj *attrObj)
PDSWriteProcs.h:582

Creates a new attribute object with the specified owner. This may raise various exceptions.

Parameters
pdDoc: IN PDDoc

The document in which the attribute object is created.

owner: IN ASAtom

The owner of the new attribute object.

indirect: IN ASBool

If, it creates the attribute object as an indirect Cos object and sets theparameter's PDDocNeedsSave flag (see PDDocFlags). If, it creates the attribute object as a direct object.

attrObj: OUT PDSAttrObj *

(Filled by the method) The newly created attribute object.

Returns
void

PDSAttrObjCreateFromStream

void PDSAttrObjCreateFromStream(IN ASAtom owner, IN OUT CosObj cosStreamObj, OUT PDSAttrObj *attrObj)
PDSWriteProcs.h:598

Creates an attribute object with the specified owner from the specified Cos stream.

Parameters
owner: IN ASAtom

The owner of the new attribute object.

cosStreamObj: IN OUT CosObj

The Cos stream containing the data with which to create the attribute. The dictionary of this stream is modified.

attrObj: OUT PDSAttrObj *

(Filled by the method) A pointer to the newly created attribute object. This actually points to. May be.

Returns
void

PDSAttrObjGetCosObj

PDSReadProcs.h:810

Gets the Cos object corresponding to the specified attribute object. This method does not copy the object, but is instead the logical equivalent of a type cast.

Parameters
attrObj: PDSAttrObj

The attribute object whose Cos object is obtained.

Returns
CosObj

The dictionary Cos object for the attribute object.

Typedefs(1)

PDSClassMap

6 items

Functions(5)

PDSClassMapAddAttrObj

void PDSClassMapAddAttrObj(IN PDSClassMap classMap, IN ASAtom classAtom, IN PDSAttrObj attrObj)
PDSWriteProcs.h:682

Adds the specified attribute object to the specified PDSClassMap for the given class name. If the attribute object is already present, it is not added a second time.

Parameters
classMap: IN PDSClassMap

The PDSClassMap to which the specified attribute object is added.

classAtom: IN ASAtom

The ASAtom representing the class name.

attrObj: IN PDSAttrObj

The attribute object to add to the class in.

Returns
void

PDSClassMapGetAttrObj

void PDSClassMapGetAttrObj(IN PDSClassMap classMap, IN ASAtom classAtom, IN ASInt32 index, OUT PDSAttrObj *attrObj)
PDSReadProcs.h:593

Gets the attribute object associated with the specified class name at an index in the class. If there is only one object and index is zero, that object is retrieved. This may throw various exceptions.

Parameters
classMap: IN PDSClassMap

The PDSClassMap.

classAtom: IN ASAtom

The ASAtom of a class name for which an associated attribute objects is found.

index: IN ASInt32

The index of the desired attribute object in the class.

attrObj: OUT PDSAttrObj *

(Filled by the method) The attribute object at. Set it to CosNull if there is no attribute object at the specified location.

Returns
void

PDSClassMapGetNumAttrObjs

PDSReadProcs.h:570

Gets the number of attribute objects associated with a class name. This may throw various exceptions.

Parameters
classMap: IN PDSClassMap

IN/OUT The PDSClassMap.

classAtom: IN ASAtom

IN/OUT The ASAtom of a class name for which the number of associated attribute objects is found.

Returns
ASInt32

The number of attribute objects associated with the class in.

PDSClassMapRemoveAttrObj

void PDSClassMapRemoveAttrObj(IN PDSClassMap classMap, IN ASAtom classAtom, IN PDSAttrObj attrObj)
PDSWriteProcs.h:714

Removes the specified attribute object from the specified PDSClassMap. If classAtom is ASAtomNull, it removes all occurrences ofin the entire.

Parameters
classMap: IN PDSClassMap

The PDSClassMap from which the specified attribute object is removed.

classAtom: IN ASAtom

The ASAtom of a class name for which the associated attribute object is found.

attrObj: IN PDSAttrObj

The attribute object to remove from.

Returns
void

Typedefs(1)

PDSClassMap

PDSExpT.h:139

Associates class identifiers, which are names, with objects of type PDSAttrObj. Structural elements maintain a list of names identifying classes to which they belong. The associated attributes are thus shared by all structural elements belonging to a given class. There is one class map per document, associated with the PDSTreeRoot. The write functions in theAPI are not available in Adobe Reader.

PDSElement

68 items

Functions(64)

PDDocEnumPDSElementsWithUserProperties

PDSReadProcs.h:841

Enumerates the elements in the document's structure tree that have UserProperties attributes or classes, calling the supplied enumeration procedure for each such element found. The procedure returnsto continue enumeration, orto halt enumeration.

Parameters
doc: PDDoc

The PDDoc whose structure elements are to be enumerated.

proc: EnumElementsWithUserPropertiesProc

The procedure to call for each PDSElement found to have UserProperties.

clientData: void *

Client-supplied data to be passed to the client callback.

Returns
ASBool

if the enumeration completes,if the enumeration callback returns.

PDDocHasUserProperties

PDSReadProcs.h:825

Returnsif 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 offor the UserProperties key in the document's MarkInfo dictionary.

Parameters
doc: PDDoc

The PDDoc to be examined.

Returns
ASBool

An ASBool indicating whether the document declares that it has structure elements with UserProperties attributes or classes.

PDSElementAddClass

void PDSElementAddClass(IN PDSElement element, IN ASAtom classAtom)
PDSWriteProcs.h:311

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 PDSElement

IN/OUT The element to which a class is added.

classAtom: IN ASAtom

IN/OUT The ASAtom representing the class to add
to. Ifis already present among theparameter's classes, it will not be added again.

Returns
void

PDSElementCreate

void PDSElementCreate(IN PDDoc pdDoc, OUT PDSElement *element)
PDSWriteProcs.h:200

Creates a new (but empty) PDSElement. This may raise various exceptions.

Parameters
pdDoc: IN PDDoc

The PDDoc in which the PDSElement is created.

element: OUT PDSElement *

(Filled by the method) The newly created PDSElement.

Returns
void

PDSElementEnumKidsWithUserProperties

PDSReadProcs.h:933

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() of the supplied structure element() such thatwould return (). The enumeration continues as long as the callback returns, and halts when the proc returnsor all virtual children have been enumerated.

Parameters
elem: PDSElement

The PDSElement below which to search for elements with user properties.

proc: EnumElementsWithUserPropertiesProc

The client-supplied callback to call for each element found.

clientData: void *

Client-supplied data to be passed to the client callback.

Returns
ASBool

if the enumeration completes,if the enumeration callback returns.

PDSElementEnumUserPropertiesAsASText

PDSReadProcs.h:872

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, and halts when the proc returnsor all properties have been enumerated.

Parameters
elem: PDSElement

The PDSElement whose user properties will be enumerated.

proc: PDSElementEnumUserPropertiesAsASTextProc

The callback that is called for each user property item.

clientData: void *

Client-supplied data to be passed to the client callback.

includeHidden: ASBool

A boolean value indicating whether the client wants to be given property items that are marked as hidden.

Returns
ASBool

if the enumeration completes,if the enumeration callback returns.

PDSElementEnumUserPropertiesAsCosObj

PDSReadProcs.h:895

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). The enumeration continues as long as the callback returns, and halts when the proc returnsor all properties have been enumerated.

Parameters
elem: PDSElement

The PDSElement whose user properties will be enumerated.

proc: PDSElementEnumUserPropertiesAsCosObjProc

The callback that is called for each user property item.

clientData: void *

Client-supplied data to be passed to the client callback.

includeHidden: ASBool

A boolean value indicating whether the client wants to be given property items that are marked as hidden.

Returns
ASBool

if the enumeration completes,if the enumeration callback returns.

PDSElementExportUserProperties

ASErrorCode PDSElementExportUserProperties(PDSElement userPropsElement, ASBool wholeSubtree, ASBool includeHidden, ASBool flattenClasses, PDUserPropertiesXMLLabels xmlLabels, ASStm output)
PDSReadProcs.h:1009

Exports user properties of the specified PDSElement in XML.

Parameters
userPropsElement: PDSElement

The element whose user properties are to be exported in XML format.

wholeSubtree: ASBool

A boolean value indicating whether to export user properties of the whole structure tree which contains, or just the subtree which starts from.

includeHidden: ASBool

A boolean value indicating whether the client wants to be given property items that are marked as hidden.

flattenClasses: ASBool

A boolean value indicating whether to flatten the attribute classes for each structure element. If, the user properties for that class will be listed as properties for that stucture element. If, 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: PDUserPropertiesXMLLabels

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: ASStm

The output stream to which user properties are written. The encoding of the characters is UTF-8.

Returns
ASErrorCode

An ASErrorCode to indicate the success of exporting user properties in XML format. If ASErrorCode is, it indicates success in exporting user properties; non-zero value indicates otherwise.

PDSElementFindAncestorWithUserProperties

PDSReadProcs.h:909

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: PDSElement

The PDSElement at which to start searching upwards through the tree.

Returns
PDSElement

The first ancestor ofthat contains UserProperties attributes or class information, or CosNull if none is found.

PDSElementGetActualText

PDSReadProcs.h:653

Gets the actual text associated with the specified PDSElement. It returns the number of bytes in the text, orif 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, call this method with abuffer. Due to implementation issues, make the buffer one byte larger than the required size. Code will not-terminate the string correctly in the case of Unicode strings.

Parameters
element: IN PDSElement

The structural element whose actual text is sought.

buffer: IN ASUns8 *

If not,contains the element's actual text. The string is-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.

Returns
ASInt32

An ASInt32 representing the number of bytes in the text, orif the element has no actual text.

PDSElementGetActualTextASText

PDSReadProcs.h:963

Gets the actual text associated with the specified PDSElement as an ASText object.

Parameters
element: PDSElement

The element whose actual text is sought.

text: ASText

(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.

Returns
void

PDSElementGetAlt

PDSReadProcs.h:328

Gets the alternate text associated with an element. It can first be called with abuffer to find the size, so that buffer can then be appropriately sized. 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. Due to implementation issues, make the buffer one byte larger than the required size. The code will not-terminate the string correctly in the case of Unicode strings.

Parameters
element: IN PDSElement

The element whose alternate text is obtained.

buffer: IN ASUns8 *

(Filled by the method) A buffer into which the alternate text is placed. It may be, if the method is called only to find the length of the element's alternate text. If it is not,contains the element's actual text. The string is-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.

Returns
ASInt32

The number of bytes in theparameter's alternate text.

PDSElementGetAltASText

PDSReadProcs.h:981

Gets the alternate text associated with the specified PDSElement as an ASText object.

Parameters
element: PDSElement

The element whose alternate text is sought.

text: ASText

(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.

Returns
void

PDSElementGetAttrObj

PDSReadProcs.h:260

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), andis zero, that attribute object is obtained.

Parameters
element: IN PDSElement

IN/OUT The element whose attribute is obtained.

index: IN ASInt32

IN/OUT The index of the attribute object to obtain.

attrObj: OUT PDSAttrObj *

IN/OUT (Filled by the method) The attribute object at.

Returns
ASInt32

The revision number ofat time of last association.

PDSElementGetClass

PDSReadProcs.h:296

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), andis zero, that class name is obtained.

Parameters
element: IN PDSElement

The element whose class is obtained.

index: IN ASInt32

The index of the class to obtain.

classAtom: OUT ASAtom *

(Filled by the method) The ASAtom describing the class.

Returns
ASInt32

The revision number ofat the time of the last association.

PDSElementGetCosObj

PDSReadProcs.h:800

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: PDSElement

The element object whose Cos object is obtained.

Returns
CosObj

The dictionary Cos object for the element object.

PDSElementGetFirstPage

CosObj PDSElementGetFirstPage(IN PDSElement pdsElement, OUT ASAtom *firstKidType, OUT CosObj *firstCosObjKidOnAPage, OUT PDEContainer *firstMCKidOnAPage)
PDSReadProcs.h:425

Gets the Cos object for the page of the first kid of the element. This may throw various exceptions. 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.

Parameters
pdsElement: IN PDSElement

IN/OUT The element whose kid's first page is found.

firstKidType: OUT ASAtom *

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. Possible values are the values that PDSElementGetKid() can return. Passto inhibit setting.

firstCosObjKidOnAPage: OUT CosObj *

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. Passto inhibit setting.

firstMCKidOnAPage: OUT PDEContainer *

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. Passto inhibit setting.

Returns
CosObj

The CosObj of the page found, CosObjNull if the element has no page content.

PDSElementGetKid

ASAtom PDSElementGetKid(IN PDSElement element, IN ASInt32 index, OUT CosObj *cosObjKid, OUT void **pointerKid, OUT CosObj *cosPage)
PDSReadProcs.h:392

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; if the kid is page content, it is placed in. Any or all of cosObjKid, pointerKid, and cosPage can beto get the kid's type without setting that parameter.

Parameters
element: IN PDSElement

The element whose specified kid is found.

index: IN ASInt32

The index of the kid to obtain.

cosObjKid: OUT CosObj *

(Filled by the method) The CosObj of
the specified kid, if that kid is a PDSElement or an OBJR.
Ifis, 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: OUT void **

(Filled by the method) A pointer to the
kid at, if that kid is an MC. Ifis, it is not filled in, but the type of the kid is returned regardless.

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.

This method cannot access marked content inside a Form XObject.

cosPage: OUT CosObj *

(Filled by the method) A pointer to the CosObj of the page containing the kid. Ifis, it is not filled in, but the type of the kid is returned regardless.

Returns
ASAtom

The ASAtom representing the kid's Type value: StructElem, MC, or OBJR. MCR is never returned.

PDSElementGetKidEx

ASAtom PDSElementGetKidEx(IN PDSElement element, IN ASInt32 index, OUT CosObj *cosObjKid, OUT ASInt32 *mcid, OUT void **pointerKid, OUT CosObj *cosPage)
PDSReadProcs.h:626

Functions identically to PDSElementGetKid(), but for children that are marked contents can return theas well as or instead of the actual object. This method cannot access marked content inside a Form XObject.

Parameters
element: IN PDSElement

The PDSElement containing the kid that is retrieved.

index: IN ASInt32

The index of the kid.

cosObjKid: OUT CosObj *

(Filled in by method) The kid being accessed (depending on the kid's type) or.

mcid: OUT ASInt32 *

(Filled in by method) The kid'sor.

pointerKid: OUT void **

(Filled in by method) A pointer to the kid, or.

cosPage: OUT CosObj *

(Filled in by method) The CosObj of the page containing the kid, or.

Returns
ASAtom

An ASAtom representing the Type value of the kid. See above.

PDSElementGetKidWithMCInfo

ASAtom PDSElementGetKidWithMCInfo(PDSElement element, ASInt32 index, CosObj *cosObjKid, PDSMCInfoP mcidInfo, void **pointerKid, CosObj *cosPage)
PDSReadProcs.h:740

Functions identically to PDSElementGetKidEx(), but returns additional information about marked content kids that are in streams other than the page content streams.

Parameters
element: PDSElement

The PDSElement containing the kid that is retrieved.

index: ASInt32

The index of the kid.

cosObjKid: CosObj *

(Filled in by method) The kid being accessed (depending on the kid's type), or.

mcidInfo: PDSMCInfoP

(Filled in by method) The kid's information object, or.

pointerKid: void **

(Filled in by method) A pointer to the kid, or.

cosPage: CosObj *

(Filled in by method) The CosObj of the page containing the kid, or.

Returns
ASAtom

An ASAtom representing the Type value of the kid.

PDSElementGetLanguage

PDSReadProcs.h:683

Gets the language associated with the specified PDSElement. It returns the number of bytes in the language string, orif 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 abuffer. Due to implementation issues, make the buffer one byte larger than the required size. Code will not-terminate the string correctly in the case of Unicode strings.

Parameters
element: IN PDSElement

The structural element whose expansion text is sought.

buffer: IN ASUns8 *

(Filled by the method) A buffer containing the element's expansion text, or. See PDSElementSetLanguage() for format and languages. If not, buffer contains the element's expansion text. The string is-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.

Returns
ASInt32

An ASInt32 representing the number of bytes in the language string.

PDSElementGetParent

void PDSElementGetParent(IN PDSElement element, OUT PDSElement *parent, OUT ASBool *parentIsTreeRoot)
PDSReadProcs.h:186

Gets the immediate ancestor element of the specified element in the tree. If the element's parent is another element,is set to that parent andis set to. If the element's parent is the structure tree root,is set to CosNull andis set to. Ifis, it is not set.

Parameters
element: IN PDSElement

The element whose parent is obtained.

parent: OUT PDSElement *

(Filled by the method) The element's parent.

parentIsTreeRoot: OUT ASBool *

(Filled by the method) The element's parent is the structure tree root.

Returns
void

PDSElementGetStructTreeRoot

PDSReadProcs.h:461

Gets the structure tree root of the document containing element.

Parameters
element: IN PDSElement

The element whose title is obtained.

treeRoot: OUT PDSTreeRoot *

(Filled by the method) The structure tree root.

Returns
ASBool

if the document has a structure tree root,otherwise. If there is a structure tree root, it setsto be the structure tree root.

PDSElementGetTitle

PDSReadProcs.h:209

Gets the title of the specified element, returning the number of bytes in the title. It can first be called with abuffer to find the title size, so that buffer can be appropriately sized as one greater than the title's length.

Parameters
element: IN PDSElement

IN/OUT The element whose title is obtained.

buffer: OUT ASUns8 *

IN/OUT (Filled by the method) A buffer into which
the title text is placed. It may be, in which case the
number of bytes in the title is returned.parameter's title, or zero ifhas no title.

Due to implementation issues, make the buffer one byte larger than the required size.

Returns

PDSElementGetType

PDSReadProcs.h:161

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: IN PDSElement

The element whose structural element type is obtained.

Returns
ASAtom

The ASAtom representing element's type.

PDSElementInsertKid

void PDSElementInsertKid(IN PDSElement element, IN PDSElement kid, IN ASInt32 insertAfter)
PDSWriteProcs.h:389

Inserts the specified kid PDSElement object into the specified element after position.

Parameters
element: IN PDSElement

The element in which the specified kid is inserted.

kid: IN PDSElement

The kid to insert.

insertAfter: IN ASInt32

The position after which the kid is inserted. Ifcurrently has no kids,is ignored.

Returns
void

PDSElementInsertMCAsKid

void PDSElementInsertMCAsKid(IN PDSElement element, IN CosObj cosPage, IN PDSMC mc, IN ASInt32 insertAfter)
PDSWriteProcs.h:413

Inserts a reference to the specified PDSMC (marked content) in the specified element after position. This method automatically creates MCR objects if needed. This may raise various exceptions.

Parameters
element: IN PDSElement

The element in which the reference is inserted.

cosPage: IN CosObj

The CosObj for the page containing the reference to insert.

mc: IN PDSMC

The marked content to insert.

insertAfter: IN ASInt32

The position after which the reference is inserted. Ifcurrently has no kids,is ignored.

Returns
void

PDSElementInsertMCAsKidEx

void PDSElementInsertMCAsKidEx(IN PDSElement element, IN CosObj cosPage, IN PDSMC mc, IN ASInt32 insertAfter, IN CosObj cosStream, IN CosObj streamOwner)
PDSWriteProcs.h:796

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: IN PDSElement

The element in which the reference is inserted.

cosPage: IN CosObj

The CosObj for the page containing the reference to insert.

mc: IN PDSMC

The marked content to insert.

insertAfter: IN ASInt32

The position after which the reference is inserted. Ifcurrently has no kids,is ignored.

cosStream: IN CosObj

The stream containing the content given by.

streamOwner: IN CosObj

A Cos object to record as the owner of the content. It can be CosNull if the owner is not important.

Returns
void

PDSElementInsertMCRefAsKid

PDSWriteProcs.h:906

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. the content reference handle will be filled out automatically if PDPageSetPDEContent(), PDEFormSetContent(), or PDEGroupSetContent() is called. Otherwise, PDEContentSetPage() or PDEContentSetContainingStmAndOwner() must be called explicitly.

Parameters
element: IN PDSElement

The structure element with which to associate marked content.

ref: IN PDSMCRef

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: IN ASInt32

The position after which the marked content is inserted into the element's kids. If the element has no children,is ignored.

Returns
See Also

PDSElementInsertOBJAsKid

void PDSElementInsertOBJAsKid(IN PDSElement element, IN CosObj cosPage, IN CosObj obj, IN ASInt32 insertAfter)
PDSWriteProcs.h:432

Inserts a reference to the specified PDF object as a kid into the specified element. This may raise various exceptions.

Parameters
element: IN PDSElement

IN/OUT The element in which the reference is inserted.

cosPage: IN CosObj

IN/OUT The CosObj for the page containing the reference
to insert.

obj: IN CosObj

IN/OUT The CosObj to insert.

insertAfter: IN ASInt32

IN/OUT The position after which the reference is
inserted in. Ifcurrently has no kids,is ignored.

Returns
void

PDSElementInsertStmMCAsKid

void PDSElementInsertStmMCAsKid(PDSElement element, CosObj cosPage, CosObj containingStm, CosObj stmOwner, PDSMC mc, ASInt32 insertAfter)
PDSWriteProcs.h:825

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: PDSElement

The element in which the reference is inserted.

cosPage: CosObj

The CosObj for the page containing the reference to insert.

containingStm: CosObj

The stream containing the content given by.

stmOwner: CosObj

The PDF object owning the stream given in(for example, the annotation to which an appearance stream belongs). It can be CosNull if the owner is not important.

mc: PDSMC

The marked content to insert.

insertAfter: ASInt32

The position after which the reference is inserted. Ifcurrently has no kids,is ignored.

Returns
void

PDSElementRemoveAttrObj

PDSWriteProcs.h:282

Removes the specified attribute object from an element. Ifdoes not have anattribute, this method does nothing. 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.

Parameters
element: IN PDSElement

The element whose attribute is removed.

attrObj: IN PDSAttrObj

The attribute object to remove.

Returns
void

PDSElementRemoveClass

void PDSElementRemoveClass(IN PDSElement element, IN ASAtom classAtom)
PDSWriteProcs.h:336

Removes the specified class name from the element's list of classes to which it belongs. 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.

Parameters
element: IN PDSElement

The element from which the specified class is removed.

classAtom: IN ASAtom

The ASAtom representing the class to remove.

Returns
void

PDSElementRemoveKidMC

void PDSElementRemoveKidMC(IN PDSElement element, IN CosObj cosPage, IN PDSMC mc)
PDSWriteProcs.h:469

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: IN PDSElement

The element whose reference is removed.

cosPage: IN CosObj

The CosObj for the page containing the reference to remove.

mc: IN PDSMC

The marked content to remove.

Returns
void

PDSElementReplaceKid

void PDSElementReplaceKid(IN PDSElement element, IN CosObj oldKid, IN CosObj newKid)
PDSWriteProcs.h:489

Replaces the specified kid in the specified element. This may raise various exceptions. The approved method of replacing OBJ kids is PDSElementReplaceKidOBJ().

Parameters
element: IN PDSElement

IN/OUT The element whose kid is replaced.

oldKid: IN CosObj

IN/OUT The kid to replace.

newKid: IN CosObj

IN/OUT The kid that is replacing.

Returns
void

PDSElementReplaceKidMC

void PDSElementReplaceKidMC(IN PDSElement element, IN CosObj oldCosPage, IN PDSMC oldMC, IN CosObj newCosPage, IN PDSMC newMC)
PDSWriteProcs.h:509

Replaces the specified PDSMC (on) with a new PDSMC (on) in the specified element. This may raise various exceptions.

Parameters
element: IN PDSElement

The element whose reference is replaced.

oldCosPage: IN CosObj

The CosObj for the page holding the reference to replace.

oldMC: IN PDSMC

The marked content to replace.

newCosPage: IN CosObj

The CosObj for the page holding the reference that is replacing.

newMC: IN PDSMC

The marked content that is replacing.

Returns
void

PDSElementReplaceKidOBJ

void PDSElementReplaceKidOBJ(IN PDSElement element, IN CosObj oldObj, IN CosObj newObj, IN CosObj newPage)
PDSWriteProcs.h:527

Replaceswithon the specified page in the specified element. This may raise various exceptions.

Parameters
element: IN PDSElement

IN/OUT The element whose object is replaced.

oldObj: IN CosObj

IN/OUT The object to replace.

newObj: IN CosObj

IN/OUT The object that is replacing.

newPage: IN CosObj

IN/OUT The CosObj for the page holding the reference that is replacing.

Returns
void

PDSElementSetActualText

void PDSElementSetActualText(IN PDSElement element, IN const ASUns8 *buffer, IN ASInt32 nBytes)
PDSWriteProcs.h:730

Sets the actual text representation of the specified PDSElement object's contents to(fromto).

Parameters
element: IN PDSElement

The PDSElement whose contents are being set to.

buffer: IN const ASUns8 *

The buffer to which the PDSElement object's contents are being set.

nBytes: IN ASInt32

The number of bytes in the text representation.

Returns
void

PDSElementSetAlt

void PDSElementSetAlt(IN PDSElement element, IN const ASUns8 *buffer, IN ASInt32 nBytes)
PDSWriteProcs.h:369

Sets the alternate text representation of an element's contents.

Parameters
element: IN PDSElement

IN/OUT The element whose alternate text representation is set.

buffer: IN const ASUns8 *

IN/OUT A pointer to a buffer containing a string to be made the element's alternate text representation.

nBytes: IN ASInt32

IN/OUT The number of bytes into use as theparameter'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().

Returns
void

PDSElementSetID

void PDSElementSetID(IN PDSElement element, IN const ASUns8 *buffer, IN ASInt32 nBytes)
PDSWriteProcs.h:545

Sets the ID of an element to the given Cos string.

Parameters
element: IN PDSElement

The element whose ID is set.

buffer: IN const ASUns8 *

A pointer to a buffer containing a string to be made the element's ID.

nBytes: IN ASInt32

The number of bytes into use as theparameter'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().

Returns
void

PDSElementSetLanguage

void PDSElementSetLanguage(IN PDSElement element, IN const ASUns8 *buffer, IN ASInt32 nBytes)
PDSWriteProcs.h:752

Sets the language field associated with the PDSElement to theparameter's contents (from 0 to nBytes). IANA registered language codes can be found at. The IETF Standard for Language Element Values (RFC 1766) can be found at.

Parameters
element: IN PDSElement

The PDSElement whose language field is set to.

buffer: IN const ASUns8 *

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. Note that the ISO 639 language codes can be found at.

nBytes: IN ASInt32

The size of. 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.

Returns
void

PDSElementSetTitle

void PDSElementSetTitle(IN PDSElement element, IN const ASUns8 *buffer, IN ASInt32 nBytes)
PDSWriteProcs.h:233

Sets an element's title.

Parameters
element: IN PDSElement

IN/OUT The element whose title is set.

buffer: IN const ASUns8 *

IN/OUT A pointer to a buffer containing a string to
be made the element's title.

nBytes: IN ASInt32

IN/OUT The number of bytes into use as theparameter'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().

Returns
void

PDSElementSetType

PDSWriteProcs.h:218

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: IN PDSElement

The element whose type is set.

type: IN ASAtom

The ASAtom representing the element's type.

Returns
void

PDSOBJGetParent

PDSReadProcs.h:517

Gets the parent element of the specified PDF object. This may throw various exceptions.

Parameters
obj: IN CosObj

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 aparent key), otherwise it is undefined.

parent: OUT PDSElement *

IN/OUT (Filled by the method) The parent element of.

Returns
void

Typedefs(4)

PDSMC

9 items

Functions(6)

PDSMCGetInfo

void PDSMCGetInfo(CosObj containingObj, PDSMC mc, PDSMCInfoP info)
PDSReadProcs.h:759

Gets information about how the specified marked content is contained in its parent. This method cannot access marked content inside a Form XObject.

Parameters
containingObj: CosObj

The CosObj containing the MC whose information is obtained. For marked content on a page, this is the Cos object representing the page. For marked content elsewhere, this is the stream in which the marked content resides.

mc: PDSMC

The marked content whose information is obtained.

info: PDSMCInfoP

(Filled by the method) A pointer to a structure that the method fills with information about.

Returns
void

PDSMCGetParent

void PDSMCGetParent(IN CosObj containingObj, IN PDSMC mc, OUT PDSElement *parent)
PDSReadProcs.h:500

Gets the parent element of the specified marked content.

Parameters
containingObj: IN CosObj

The CosObj containing the MC whose parent is obtained. For marked content on a page, this is the Cos object representing the page. For marked content elsewhere, this is the stream in which the marked content resides.

mc: IN PDSMC

The marked content whose parent is obtained.

parent: OUT PDSElement *

(Filled by the method) The parent element of.

Returns
void

PDSMCIDGetParent

ASBool PDSMCIDGetParent(ASInt32 mcid, CosObj containingObj, PDSElement *parent)
PDSReadProcs.h:781

Gets the parent element of the specified marked content, referred to by its containing object and marked-content identifier.

Parameters
mcid: ASInt32

The identifier (MCID) of the marked content whose parent is obtained.

containingObj: CosObj

The CosObj containing the marked content whose parent is obtained. For marked content on a page, this is the Cos object representing the page. For marked content elsewhere, this is the stream in which the marked content resides.

parent: PDSElement *

(Filled by the method) The parent element of.

Returns
ASBool

if the parent is successfully obtained,otherwise.

PDSMCRefCreate

PDSWriteProcs.h:868

Creates a reference handle to a piece of marked content that can be used to associate the content with structure. The handle can persist beyond the lifetime of the marked contents, allowing greater flexibility about when structure information can be created. This may raise various exceptions. This must be called before placing the container within the content stream that owns it. The handle will persist until PDSMCRefDestroy is called. All values in theobject apart from mcid are currently ignored.

Parameters
container: IN PDEElement

The marked content to create a reference for. It must be either a PDEContainer or PDEBeginContainer.

cosDoc: IN CosDoc

The document within which the reference will be used.

mcid: IN ASInt32

The mcid to set for the container.

Returns

PDSMCRefDestroy

PDSWriteProcs.h:884

Destroys a marked content reference created with PDSMCRefCreate(). This should only be called once the reference has been placed in the structure tree or if the reference is no longer needed. If the PDSMCRef is associated with a PDSMC, it will be set as invalid and ignored on subsequent processing.

Parameters
ref: IN PDSMCRef

The marked content reference to destroy.

Returns
void

Typedefs(2)

PDSMC

PDSExpT.h:117

Represents marked content, which are portions of the graphic content of a PDF document that may be included in the document's logical structure hierarchy. This type is identical with the PDFEdit layer type PDEContainer. The write functions in theAPI are not available in Adobe Reader.

Structures(1)

PDSMCRef

typedef struct _t_PDSMCRef* PDSMCRef
PDSExpT.h:151

An opaque pointer type to a marked content reference handle.

PDSRoleMap

7 items

Functions(6)

PDSRoleMapCopy

void PDSRoleMapCopy(IN PDSRoleMap srcRoleMap, IN PDSTreeRoot dstTreeRoot, OUT PDSRoleMap *dstRoleMap)
PDSWriteProcs.h:660

Makes a copy of a PDSRoleMap, making it the PDSRoleMap of the specified StructTreeRoot. This may raise various exceptions.

Parameters
srcRoleMap: IN PDSRoleMap

The PDSRoleMap to copy.

dstTreeRoot: IN PDSTreeRoot

The structure tree root in which to place srcRoleMap.

dstRoleMap: OUT PDSRoleMap *

(Filled by the method) If not, it points to the new, copied PDSRoleMap.

Returns
void

PDSRoleMapDoesMap

PDSReadProcs.h:552

Determines whether the specified PDSRoleMap provides any mapping path for two given element types.

Parameters
roleMap: IN PDSRoleMap

IN/OUT The PDSRoleMap.

src: IN ASAtom

IN/OUT The ASAtom for an element type whose mapping is tested.

dst: IN ASAtom

IN/OUT The ASAtom for an element type. Note that this may be a standard element type.

Returns
ASBool

if an mapping path was found,otherwise.

See Also

PDSRoleMapMap

void PDSRoleMapMap(IN PDSRoleMap roleMap, IN ASAtom src, IN ASAtom dst)
PDSWriteProcs.h:616

Maps an element type () to another element type () in the specified PDSRoleMap.

Parameters
roleMap: IN PDSRoleMap

The PDSRoleMap in which to create a new mapping.

src: IN ASAtom

The element type to map to.

dst: IN ASAtom

The element type thatmaps onto. Note that this may be a standard element type, such as P.

Returns
void

PDSRoleMapUnMapDst

PDSWriteProcs.h:644

Makes the specified element type have no mapping.

Parameters
roleMap: IN PDSRoleMap

The PDSRoleMap in which to un-map all element types that map onto theelement type.

dst: IN ASAtom

The element type to which all mappings are removed. All element types that map to theelement type are unmapped.

Returns
void

PDSRoleMapUnMapSrc

void PDSRoleMapUnMapSrc(IN PDSRoleMap roleMap, IN ASAtom src, IN ASBool fixupOthers)
PDSWriteProcs.h:632

Makes the specified element type have no mapping. This may raise various exceptions.

Parameters
roleMap: IN PDSRoleMap

IN/OUT The PDSRoleMap in which to un-map theelement type.

src: IN ASAtom

IN/OUT The element type whose mapping is removed.

fixupOthers: IN ASBool

IN/OUT If, any element type that was directly mapped tois mapped to whateverpreviously mapped to. If, PDSRoleMapUnMapSrc() only un-maps.

Returns
void

Typedefs(1)

PDSRoleMap

PDSExpT.h:130

Represents mappings of structural element types present in a PDF document to standard element types having similar uses. There is one PDSClassMap per document, associated with the PDSTreeRoot. The write functions in theAPI are not available in Adobe Reader.

PDSTreeRoot

17 items

Functions(16)

PDDocCreateStructTreeRoot

PDSWriteProcs.h:66

Creates a new StructTreeRoot element. If PDDocCreateStructTreeRoot() is called on a PDDoc that already has a structure tree root, it returns without modifying the document. It raises an exception ifalready has a StructTreeRoot.

Parameters
pdDoc: IN PDDoc

IN/OUT The PDDoc for which the StructTreeRoot element is created.

treeRoot: OUT PDSTreeRoot *

IN/OUT (Filled by the method) The newly-created StructTreeRoot element.

Returns
void

PDSTreeRootCreateClassMap

PDSWriteProcs.h:171

Creates a PDSClassMap in the specified tree root. Any previously existing PDSClassMap is unlinked. This may raise various exceptions.

Parameters
treeRoot: IN PDSTreeRoot

The structure tree root in which to create a PDSClassMap.

classMap: OUT PDSClassMap *

(Filled by the method) The newly created PDSClassMap.

Returns
void

PDSTreeRootCreateRoleMap

PDSWriteProcs.h:140

Creates and sets the PDSRoleMap of the specified StructTreeRoot element. Any previously existing PDSRoleMap is unlinked. This may raise various exceptions.

Parameters
treeRoot: IN PDSTreeRoot

The structure tree root in which to create a PDSRoleMap.

roleMap: OUT PDSRoleMap *

(Filled by the method) The newly created PDSRoleMap.

Returns
void

PDSTreeRootGetClassMap

PDSReadProcs.h:120

Gets the PDSClassMap object for the specified structure tree root. This may throw various exceptions.

Parameters
treeRoot: IN PDSTreeRoot

The structure tree root whose PDSClassMap is obtained.

classMap: OUT PDSClassMap *

(Filled by the method) A pointer to a location in which to return the class map, if one exists. Set it to CosNull if there is no class map. If apointer is passed, no retrieval will take place.

Returns
ASBool

if there is a class map,otherwise.

PDSTreeRootGetElementFromID

ASBool PDSTreeRootGetElementFromID(IN PDSTreeRoot treeRoot, IN const char *id, IN ASInt32 numChars, OUT PDSElement *element)
PDSReadProcs.h:140

Gets the element associated with the given ID, if any.

Parameters
treeRoot: IN PDSTreeRoot

The structure tree root in which to search
for.

id: IN const char *

A pointer to a buffer containing the ID to search
for..

numChars: IN ASInt32
element: OUT PDSElement *

(Filled by the method) The element corresponding
to. It is undefined if no element has the specified.if an element foris found, orwith element undefined if the tree root contains no IDTree value.

Returns
See Also

PDSTreeRootGetRoleMap

PDSReadProcs.h:103

Gets the PDSRoleMap object for the specified structure tree root. This may throw various exceptions.

Parameters
treeRoot: IN PDSTreeRoot

The structure tree root whose PDSRoleMap is obtained.

roleMap: OUT PDSRoleMap *

(Filled by the method) A pointer to a location in which to return the role map, if one exists. Set it to CosNull if there is no role map. If apointer is passed, no retrieval will take place.

Returns
ASBool

if there is a role map,otherwise.

PDSTreeRootInsertKid

void PDSTreeRootInsertKid(IN PDSTreeRoot treeRoot, IN PDSElement kid, IN ASInt32 insertAfter)
PDSWriteProcs.h:95

Inserts the specified kid element after the given position as a kid of the specified structure tree root. This may raise various exceptions.

Parameters
treeRoot: IN PDSTreeRoot

IN/OUT The structure tree root in which a kid is inserted.

kid: IN PDSElement

IN/OUT The kid to insert.

insertAfter: IN ASInt32

IN/OUT The position after which the kid is inserted. Ifcurrently has no kids,is ignored.

Returns
void

PDSTreeRootReplaceStreamRef

void PDSTreeRootReplaceStreamRef(PDSTreeRoot treeRoot, CosObj oldStream, CosObj newStream)
PDSWriteProcs.h:842

Updates the stream entries (Stm) in marked content reference dictionaries to reference a new Cos stream object. It replaces references to the old stream with refererences to the new stream. This may raise various exceptions.

Parameters
treeRoot: PDSTreeRoot

The structure tree root in which stream references are updated.

oldStream: CosObj

The stream reference to replace.

newStream: CosObj

The stream reference that is replacing.

Returns
void

Typedefs(1)