Poppler.StructureElementIter¶
Fields¶
None
Methods¶
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Details¶
- class Poppler.StructureElementIter¶
 Since 24.10 this type supports g_autoptr
- classmethod new(poppler_document)¶
 - Parameters:
 poppler_document (
Poppler.Document) – aPoppler.Document.- Returns:
 a new
Poppler.StructureElementIter, orNoneif document doesn’t have structure tree.- Return type:
 
Returns the root
Poppler.StructureElementIterfor document, orNone. The returned value must be freed withPoppler.StructureElementIter.free().Documents may have an associated structure tree —mostly, Tagged-PDF compliant documents— which can be used to obtain information about the document structure and its contents. Each node in the tree contains a
Poppler.StructureElement.Here is a simple example that walks the whole tree:
<informalexample><programlisting> static void walk_structure (
Poppler.StructureElementIter*iter) { do { /<!– –>* Get the element and do something with it *<!– –>/Poppler.StructureElementIter*child =Poppler.StructureElementIter.get_child(iter); if (child) walk_structure (child);Poppler.StructureElementIter.free(child); } while (Poppler.StructureElementIter.next(iter)); } … { iter =Poppler.StructureElementIter.new(document); walk_structure (iter);Poppler.StructureElementIter.free(iter); } </programlisting></informalexample>New in version 0.26.
- copy()¶
 - Returns:
 - Return type:
 
Creates a new
Poppler.StructureElementIteras a copy of self. The returned value must be freed withPoppler.StructureElementIter.free().New in version 0.26.
- free()¶
 Frees self.
New in version 0.26.
- get_child()¶
 - Returns:
 - Return type:
 
Returns a new iterator to the children elements of the
Poppler.StructureElementassociated with iter. The returned value must be freed withPoppler.StructureElementIter.free().New in version 0.26.
- get_element()¶
 - Returns:
 - Return type:
 
Returns the
Poppler.StructureElementIterassociated with self.New in version 0.26.
- next()¶
 - 
Sets self to point to the next structure element at the current level of the tree, if valid. See
Poppler.StructureElementIter.new() for more information.New in version 0.26.