Class: ContentItem

Core.PDFNet. ContentItem


new ContentItem( [o] [, p])

Content items are graphical objects that exist in the document independently of the structure tree but are associated with structure elements. Content items are leaf nodes of the structure tree.
Parameters:
Name Type Argument Description
o Core.PDFNet.Obj <optional>
p Core.PDFNet.Obj <optional>
Properties:
Name Type Description
o Core.PDFNet.Obj
p Core.PDFNet.Obj

Members


<static> Type

Properties:
Name Type Description
e_MCR number
e_MCID number
e_OBJR number
e_Unknown number

Methods


copy()

Copy Constructor
Returns:
A promise that resolves to an object of type: "PDFNet.ContentItem"
Type
Promise.<Core.PDFNet.ContentItem>

getContainingStm()

Returns:
A promise that resolves to the stream object that contains the marked-content sequence. The function will return a non-NULL object only if the marked-content sequence resides in a content stream other than the content stream for the page (e.g. in a form XObject). Note: this method only applies to content items with type e_MCR.
Type
Promise.<Core.PDFNet.Obj>

getMCID()

Returns:
A promise that resolves to mcid (marked-content identifier). Note: this method only applies to content items with types e_MCR or e_MCID.
Type
Promise.<number>

getPage()

the page on which the marked content is drawn, whether directly as part of page content or indirectly by being in a Form XObject or annotation drawn on that page.
Returns:
A promise that resolves to an object of type: "PDFNet.Page"
Type
Promise.<Core.PDFNet.Page>

getParent()

find the parent structure element.
Returns:
A promise that resolves to an object of type: "PDFNet.SElement"
Type
Promise.<Core.PDFNet.SElement>

getRefObj()

Returns:
A promise that resolves to the referenced object. Note: this method only applies to content items with type e_OBJR.
Type
Promise.<Core.PDFNet.Obj>

getSDFObj()

Returns:
A promise that resolves to pointer to the underlying SDF/Cos object.
Type
Promise.<Core.PDFNet.Obj>

getStmOwner()

Returns:
A promise that resolves to nULL or the PDF object owning the stream returned by GetContainingStm() (e.g. the annotation to which an appearance stream belongs). Note: this method only applies to content items with type e_MCR.
Type
Promise.<Core.PDFNet.Obj>

getType()

Returns:
A promise that resolves to the content item type.
Type
Promise.<number>
Example
Return value enum:
<pre>
PDFNet.ContentItem.Type = {
	e_MCR : 0
	e_MCID : 1
	e_OBJR : 2
	e_Unknown : 3
}
</pre>