gi-poppler-0.18.18: Poppler bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Poppler.Structs.StructureElementIter

Contents

Description

No description available in the introspection data.

Synopsis

Exported types

Methods

copy

structureElementIterCopy Source #

Creates a new StructureElementIter as a copy of iter. The returned value must be freed with structureElementIterFree.

Since: 0.26

free

structureElementIterFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> StructureElementIter

iter: a StructureElementIter

-> m () 

Frees iter.

Since: 0.26

getChild

structureElementIterGetChild Source #

Returns a new iterator to the children elements of the StructureElement associated with iter. The returned value must be freed with structureElementIterFree.

Since: 0.26

getElement

new

structureElementIterNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

popplerDocument: a Document.

-> m StructureElementIter

Returns: a new StructureElementIter, or Nothing if document doesn't have structure tree.

Returns the root StructureElementIter for document, or Nothing. The returned value must be freed with structureElementIterFree.

Documents may have an associated structure tree &mdashmostly, 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 StructureElement.

Here is a simple example that walks the whole tree:

<informalexample><programlisting> static void walk_structure (PopplerStructureElementIter *iter) { do { /<!-- -->* Get the element and do something with it *<!-- -->/ PopplerStructureElementIter *child = poppler_structure_element_iter_get_child (iter); if (child) walk_structure (child); poppler_structure_element_iter_free (child); } while (poppler_structure_element_iter_next (iter)); } ... { iter = poppler_structure_element_iter_new (document); walk_structure (iter); poppler_structure_element_iter_free (iter); } </programlisting></informalexample>

Since: 0.26

next

structureElementIterNext Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> StructureElementIter

iter: a StructureElementIter

-> m Bool

Returns: True, if iter was set to the next structure element

Sets iter to point to the next structure element at the current level of the tree, if valid. See structureElementIterNew for more information.

Since: 0.26