Class Index

Classes


Class PDFNet.STree

PDFNet.STree

Class Summary
Constructor Attributes Constructor Name and Description
 
STree is the root of the structure tree, which is a central repository for information related to a PDF document's logical structure.
Method Summary
Method Attributes Method Name and Description
 
copy()
Copy Constructor
<static>  
PDFNet.STree.create(struct_dict)
Initialize a STree using an existing low-level Cos/SDF object.
<static>  
PDFNet.STree.createFromPDFDoc(doc)
Create a structure tree if it is missing, else return the existing structure tree
 
 
getKid(index)
 
 
 
 
insert(kid, insert_before)
Inserts the specified kid element after the given position as a kid of the specified structure tree root.
 
Class Detail
PDFNet.STree(id)
STree is the root of the structure tree, which is a central repository for information related to a PDF document's logical structure. There is at most one structure tree in each document.
Parameters:
id
Method Detail
{STree} copy()
Copy Constructor
Returns:
{STree} A promise that resolves to an object of type: "STree" (generated documentation)

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

<static> {STree} PDFNet.STree.createFromPDFDoc(doc)
Create a structure tree if it is missing, else return the existing structure tree
Parameters:
{PDFDoc} doc
the document in which to create or get the structure tree from
Returns:
{STree} A promise that resolves to structure tree of the document

{ClassMap} getClassMap()
Returns:
{ClassMap} A promise that resolves to the ClassMap object from the structure tree root.

{selement} getKid(index)
Parameters:
{number} index
The index of the kid to obtain.
Returns:
{selement} A promise that resolves to the kid at an array index in the structure tree root.

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

{RoleMap} getRoleMap()
Returns:
{RoleMap} A promise that resolves to the RoleMap object from the structure tree root.

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

insert(kid, insert_before)
Inserts the specified kid element after the given position as a kid of the specified structure tree root.
Parameters:
{selement} kid
The kid element to insert.
{number} insert_before
The position after which the kid is inserted. If element currently has no kids, insert_before is ignored.

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

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