Class Index

Classes


Class PDFNet.SElement

PDFNet.SElement

Class Summary
Constructor Attributes Constructor Name and Description
 
PDFNet.SElement(obj, k)
SElement represents PDF structural elements, which are nodes in a tree structure, defining a PDF document's logical structure.
Method Summary
Method Attributes Method Name and Description
 
assign(right)
Copy Constructor
<static>  
PDFNet.SElement.create(dict)
Initialize a SElement using an existing low-level Cos/SDF object.
 
createContentItem(doc, page, insert_before)
<static>  
PDFNet.SElement.createFromPDFDoc(doc, struct_type)
Creates a new SElement.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
insert(kid, insert_before)
[Documentation Not Yet Added]
 
 
Class Detail
PDFNet.SElement(obj, k)
SElement represents PDF structural elements, which are nodes in a tree structure, defining a PDF document's logical structure. Unlike the StructTree, SElement can have two different kinds of children: another SElement or a ContentItem (which can be marked content (MC), or a PDF object reference (OBJR)).
Parameters:
obj
k
Method Detail
assign(right)
Copy Constructor
Parameters:
{selement} right
(generated documentation)

<static> {selement} PDFNet.SElement.create(dict)
Initialize a SElement using an existing low-level Cos/SDF object.
Parameters:
{Obj} dict
a low-level (SDF/Cos) dictionary representing the structural element.
Returns:
{selement} A promise that resolves to an object of type: "selement" (generated documentation)

{number} createContentItem(doc, page, insert_before)
Parameters:
{PDFDoc} doc
The document in which the new ContentItem will be created in.
{Page} page
The page object to insert the ContentItem in.
{number} insert_before
The position after which the kid is inserted. If element currently has no kids, insert_before is ignored.
Returns:
{number} A promise that resolves to an object of type: "number" (generated documentation)

<static> {selement} PDFNet.SElement.createFromPDFDoc(doc, struct_type)
Creates a new SElement.
Parameters:
{PDFDoc [Y]} doc
{string} struct_type
(generated documentation)
Returns:
{selement} A promise that resolves to an object of type: "selement" (generated documentation)

{string} getActualText()
Returns:
{string} A promise that resolves to the ActualText associated with this element.

{string} getAlt()
Returns:
{string} A promise that resolves to the alternate text associated with this element.

{contentitem} getAsContentItem(index)
Parameters:
{number} index
The index of the kid to obtain.
Returns:
{contentitem} A promise that resolves to the kid at a given array index assuming that the kid is a ContentItem.

{selement} getAsStructElem(index)
Parameters:
{number} index
The index of the kid to obtain.
Returns:
{selement} A promise that resolves to the kid at a given array index assuming that the kid is a SElement.

{Obj} getID()
Returns:
{Obj} A promise that resolves to the ID of an element, or NULL if the ID is not defined.

{number} getNumKids()
Returns:
{number} A promise that resolves to the number of direct kids.

{selement} getParent()
Returns:
{selement} A promise that resolves to the immediate ancestor element of the specified element in the structure tree.

{Obj} getSDFObj()
Returns:
{Obj} A promise that resolves to pointer to the underlying SDF/Cos object.

{STree} getStructTreeRoot()
Returns:
{STree} A promise that resolves to the structure tree root of the document that directly or indirectly contains this element.

{string} getTitle()
Returns:
{string} A promise that resolves to the title of this structure element.

{string} getType()
Returns:
{string} A promise that resolves to the element's structural element type. The type corresponds to the 'S' (i.e. subtype) key in the structure element dictionary. The type identifies the nature of the structure element and its role within the document (such as a chapter, paragraph, or footnote).

{boolean} hasActualText()
Returns:
{boolean} A promise that resolves to if this structure element defines ActualText. ActualText is an exact replacement for the structure element and its children. This replacement text is useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes.

{boolean} hasAlt()
Returns:
{boolean} A promise that resolves to if this structure element defines Alt text. Alt text is an alternate description of the structure element and its children in human-readable form, which is useful when extracting the document's contents in support of accessibility.

{boolean} hasTitle()
Returns:
{boolean} A promise that resolves to if this SElement has title. The title of the structure element, a text string representing it in human-readable form.

insert(kid, insert_before)
[Documentation Not Yet Added]
Parameters:
{selement} kid
(generated documentation)
{number} insert_before
(generated documentation)

{boolean} isContentItem(index)
Parameters:
{number} index
The index of the kid type to obtain. To retrieve a content item at a given array index use GetAsContentItem(index), otherwise use GetAsStructElem(index)
Returns:
{boolean} A promise that resolves to true if the kid at a given array index is a content item, false otherwise.

{boolean} isValid()
Returns:
{boolean} A promise that resolves to true if this is a valid structure element object, false otherwise.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Sep 09 2016 14:32:42 GMT-0700 (PDT)