![]() |
PDFix SDK
7.2.0
|
PdsStructElement class. More...
#include <pdfix.h>
Public Member Functions | |
virtual int | GetType (bool mapped, wchar_t *buffer, int len) const =0 |
virtual bool | SetType (const wchar_t *type)=0 |
Sets the struct element type. More... | |
virtual int | GetActualText (wchar_t *buffer, int len) const =0 |
virtual bool | SetActualText (const wchar_t *alt)=0 |
virtual int | GetAlt (wchar_t *buffer, int len) const =0 |
virtual bool | SetAlt (const wchar_t *alt)=0 |
virtual int | GetTitle (wchar_t *buffer, int len) const =0 |
Gets the title of the specified element, returning the number of bytes in the title. More... | |
virtual bool | SetTitle (const wchar_t *title)=0 |
Sets the title associated with an element. More... | |
virtual int | GetAbbreviation (wchar_t *buffer, int len) const =0 |
Gets the expanded form of an abbreviation. More... | |
virtual int | GetPageNumber () const =0 |
virtual PdsObject * | GetAttrObject (int index)=0 |
virtual bool | AddAttrObj (PdsObject *object)=0 |
Associates the specified attribute object with an element. More... | |
virtual bool | RemoveAttrObj ()=0 |
virtual PdsObject * | GetObject ()=0 |
virtual PdsObject * | GetChildObject (int index)=0 |
virtual PdfStructElementType | GetChildType (int index)=0 |
virtual int | GetChildPageNumber (int index) const =0 |
Returns a page number representing a page on which the child is rendered. More... | |
virtual int | GetChildMcid (int index) const =0 |
virtual int | GetNumAttrObjects () const =0 |
Gets the number of attribute objects directly attached to the specified element. More... | |
virtual int | GetNumChildren () const =0 |
Gets the number of childs of the specified element. More... | |
virtual PdsObject * | GetParentObject ()=0 |
virtual int | GetId (wchar_t *buffer, int len) const =0 |
virtual bool | SetId (const wchar_t *id)=0 |
Sets the id associated with an element. More... | |
virtual int | GetLang (wchar_t *buffer, int len) const =0 |
virtual bool | SetLang (const wchar_t *alt)=0 |
Sets the Lang entry of a struct element. More... | |
virtual bool | RemoveChild (int index)=0 |
Removes the specified child from an element. More... | |
virtual bool | MoveChild (int index, PdsStructElement *dest_element, int dest_index)=0 |
Modes the specified child to specified index in another element. More... | |
virtual bool | AddChild (PdsStructElement *element, int index)=0 |
Adds the new PdsStructElement. More... | |
virtual PdsStructElement * | AddNewChild (const wchar_t *type, int index)=0 |
Adds a new (but empty) PdsStructElement of specific type. More... | |
virtual bool | AddPageObject (PdsPageObject *object, int index)=0 |
virtual PdsStructElement * | AddAnnot (PdfAnnot *annot, int index)=0 |
virtual PdsStructTree * | GetStructTree ()=0 |
Get pointer to the parent struct tree object. | |
PdsStructElement class.
PdsStructElement 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.
|
pure virtual |
Inserts a reference to the specified annotation as a child into the specified element. This method automatically creates OBJR object.
object | The annotation to insert. |
index | Position where the annotation object is inserted. |
|
pure virtual |
Associates the specified attribute object with an element.
object | Attribute object to associate with element. |
|
pure virtual |
Adds the new PdsStructElement.
element | The element to add. |
index | Position where the child is inserted. If element currently has no children, index is ignored. |
|
pure virtual |
Adds a new (but empty) PdsStructElement of specific type.
type | The name representing the element's type. |
index | Position where the child is inserted to parents children. If element currently has no children, index is ignored. |
|
pure virtual |
Inserts a reference to the specified page object as a child into the specified element. This method automatically creates MCR objects if needed.
object | The page object to insert. |
index | Position where the page object is inserted. |
|
pure virtual |
Gets the expanded form of an abbreviation.
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
|
pure virtual |
Gets the actual text associated with the specified element. 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.
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
|
pure virtual |
Gets the alternate text associated with an element. NOTE: 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 HasAlt first.
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
|
pure virtual |
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.
index | Index of the attribute object to obtain. |
|
pure virtual |
Returns a child's MCID. Note: Call this method only in a case that PdfStructElement::GetChildType returns kPdsStructChildPageContent type. Otherwise this method it returns -1.
index | The index of the child. |
|
pure virtual |
Gets the child's object at an array index for the structure element. A PDF structural elements unlike the structure tree root can have several different kinds of children : marked content ID, another structural element, or an object reference.
index | The index of the child. |
|
pure virtual |
Returns a page number representing a page on which the child is rendered.
index | The index of the child. |
|
pure virtual |
Gets the child's type at an array index for the structure element. A PDF structural elements unlike the structure tree root can have several different kinds of children : marked content ID, another structure element, or an object object reference dictionary denoting a PdsObject.
index | The index of the child. |
|
pure virtual |
Gets the ID of an element. The element identifier, a string designating this structure element. The string must be unique among all elements in the document's structure hierarchy. The IDTree entry in the structure tree root defines the correspondence between element identifiers and the structure elements they denote.
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
|
pure virtual |
Gets the Lang entry of a struct element. A language identifier specifying the natural language for all text in the structure element except where overridden by language specifications for nested structure elements or marked content
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
|
pure virtual |
Gets the number of attribute objects directly attached to the specified element.
|
pure virtual |
Gets the number of childs of the specified element.
|
pure virtual |
Gets the object corresponding to the specified element object. This method does not copy the object, but is instead the logical equivalent of a type cast
|
pure virtual |
Returns a page number representing a page on which some or all of the content items designated by the K entry are rendered
|
pure virtual |
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's object.
parent | (filled by method) The element parent's object. |
|
pure virtual |
Gets the title of the specified element, returning the number of bytes in the title.
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
|
pure virtual |
Gets the element's structural element type. It maps an element type to another element type if the specified element type has role mapping.
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
|
pure virtual |
Modes the specified child to specified index in another element.
index | The index of the child. |
|
pure virtual |
Removes the specified attribute object from an element. If element does not have an attrObj attribute, this method does nothing.
|
pure virtual |
Removes the specified child from an element.
index | The index of the child. |
|
pure virtual |
Sets the Actual Text text associated with an element. Text that is an exact replacement for the structure element and its children. This replacement text (which should apply to as small a piece of content as possible) is useful when extracting the document’s contents in support of accessibility to users with disabilities or for other purposes
title | String value to be set for the ActualText. |
|
pure virtual |
Sets the alternate text associated with an element. NOTE: 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 HasAlt first.
alt | String value to be set for the alt text. |
|
pure virtual |
Sets the id associated with an element.
alt | String value to be set for the struct element id. |
|
pure virtual |
Sets the Lang entry of a struct element.
alt | String value to be set for the struct element Lang. |
|
pure virtual |
Sets the title associated with an element.
title | String value to be set for the specific Info dictionary entry. |
|
pure virtual |
Sets the struct element type.
type | The name representing the element's type. |