## PopplerStructureElement

PopplerStructureElement — Document structure element.

## Functions

PopplerStructureElementIter * | poppler_structure_element_iter_new ()
gboolean | poppler_structure_element_iter_next ()
PopplerStructureElementIter * | poppler_structure_element_iter_copy ()
void | poppler_structure_element_iter_free ()
PopplerStructureElementIter * | poppler_structure_element_iter_get_child ()
PopplerStructureElement * | poppler_structure_element_iter_get_element ()
PopplerStructureElementKind | poppler_structure_element_get_kind ()
gint | poppler_structure_element_get_page ()
gboolean | poppler_structure_element_is_content ()
gboolean | poppler_structure_element_is_inline ()
gboolean | poppler_structure_element_is_block ()
gboolean | poppler_structure_element_is_grouping ()
gchar * | poppler_structure_element_get_id ()
gchar * | poppler_structure_element_get_title ()
gchar * | poppler_structure_element_get_abbreviation ()
gchar * | poppler_structure_element_get_language ()
gchar * | poppler_structure_element_get_text ()
gchar * | poppler_structure_element_get_alt_text ()
gchar * | poppler_structure_element_get_actual_text ()
PopplerTextSpan ** | poppler_structure_element_get_text_spans ()
PopplerStructurePlacement | poppler_structure_element_get_placement ()
PopplerStructureWritingMode | poppler_structure_element_get_writing_mode ()
gboolean | poppler_structure_element_get_background_color ()
gboolean | poppler_structure_element_get_border_color ()
void | poppler_structure_element_get_border_style ()
gboolean | poppler_structure_element_get_border_thickness ()
void | poppler_structure_element_get_padding ()
gboolean | poppler_structure_element_get_color ()
gdouble | poppler_structure_element_get_space_before ()
gdouble | poppler_structure_element_get_space_after ()
gdouble | poppler_structure_element_get_start_indent ()
gdouble | poppler_structure_element_get_end_indent ()
gdouble | poppler_structure_element_get_text_indent ()
PopplerStructureTextAlign | poppler_structure_element_get_text_align ()
gboolean | poppler_structure_element_get_bounding_box ()
gdouble | poppler_structure_element_get_width ()
gdouble | poppler_structure_element_get_height ()
PopplerStructureBlockAlign | poppler_structure_element_get_block_align ()
PopplerStructureInlineAlign | poppler_structure_element_get_inline_align ()
void | poppler_structure_element_get_table_border_style ()
void | poppler_structure_element_get_table_padding ()
gdouble | poppler_structure_element_get_baseline_shift ()
gdouble | poppler_structure_element_get_line_height ()
gboolean | poppler_structure_element_get_text_decoration_color ()
gdouble | poppler_structure_element_get_text_decoration_thickness ()
PopplerStructureTextDecoration | poppler_structure_element_get_text_decoration_type ()
PopplerStructureRubyAlign | poppler_structure_element_get_ruby_align ()
PopplerStructureRubyPosition | poppler_structure_element_get_ruby_position ()
PopplerStructureGlyphOrientation | poppler_structure_element_get_glyph_orientation ()
guint | poppler_structure_element_get_column_count ()
gdouble * | poppler_structure_element_get_column_gaps ()
gdouble * | poppler_structure_element_get_column_widths ()
PopplerStructureListNumbering | poppler_structure_element_get_list_numbering ()
PopplerStructureFormRole | poppler_structure_element_get_form_role ()
PopplerStructureFormState | poppler_structure_element_get_form_state ()
gchar * | poppler_structure_element_get_form_description ()
guint | poppler_structure_element_get_table_row_span ()
guint | poppler_structure_element_get_table_column_span ()
gchar ** | poppler_structure_element_get_table_headers ()
PopplerStructureTableScope | poppler_structure_element_get_table_scope ()
gchar * | poppler_structure_element_get_table_summary ()
PopplerTextSpan * | poppler_text_span_copy ()
void | poppler_text_span_free ()
gboolean | poppler_text_span_is_fixed_width_font ()
gboolean | poppler_text_span_is_serif_font ()
gboolean | poppler_text_span_is_bold_font ()
void | poppler_text_span_get_color ()
const gchar * | poppler_text_span_get_text ()
const gchar * | poppler_text_span_get_font_name ()

## Types and Values

| PopplerStructureElement
enum | PopplerStructureElementKind
| PopplerStructureElementIter
enum | PopplerStructureGetTextFlags
enum | PopplerStructurePlacement
enum | PopplerStructureWritingMode
enum | PopplerStructureBorderStyle
enum | PopplerStructureTextAlign
enum | PopplerStructureBlockAlign
enum | PopplerStructureInlineAlign
enum | PopplerStructureTextDecoration
enum | PopplerStructureRubyAlign
enum | PopplerStructureRubyPosition
enum | PopplerStructureGlyphOrientation
enum | PopplerStructureListNumbering
enum | PopplerStructureTableScope
enum | PopplerStructureFormRole
enum | PopplerStructureFormState
| PopplerTextSpan

## Object Hierarchy

        GBoxed
        ╰── PopplerStructureElementIter
        GObject
        ╰── PopplerStructureElement

## Includes

    #include <poppler.h>

## Description

Instances of PopplerStructureElement are used to describe the structure of a PopplerDocument. To access the elements in the structure of the document, use `poppler_structure_element_iter_new()` to obtain an iterator for the top-level PopplerStructureElement, and then use the PopplerStructureElementIter methods to traverse the structure tree.

## Functions

### poppler_structure_element_iter_new ()

    PopplerStructureElementIter *
    poppler_structure_element_iter_new (PopplerDocument *poppler_document);

Returns the root PopplerStructureElementIter for `document` , or `NULL`. The returned value must be freed with `poppler_structure_element_iter_free()`.

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 PopplerStructureElement.

Here is a simple example that walks the whole tree:

    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);
    }

#### Parameters

poppler_document | a PopplerDocument. |

#### Returns

a new PopplerStructureElementIter, or `NULL` if document doesn't have structure tree.

[transfer full]

Since: 0.26

### poppler_structure_element_iter_next ()

    gboolean
    poppler_structure_element_iter_next (PopplerStructureElementIter *iter);

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

#### Parameters

iter | a PopplerStructureElementIter |

#### Returns

`TRUE`, if `iter` was set to the next structure element

Since: 0.26

### poppler_structure_element_iter_copy ()

    PopplerStructureElementIter *
    poppler_structure_element_iter_copy (PopplerStructureElementIter *iter);

Creates a new PopplerStructureElementIter as a copy of `iter` . The returned value must be freed with `poppler_structure_element_iter_free()`.

#### Parameters

iter | a PopplerStructureElementIter |

#### Returns

a new PopplerStructureElementIter.

[transfer full]

Since: 0.26

### poppler_structure_element_iter_free ()

    void
    poppler_structure_element_iter_free (PopplerStructureElementIter *iter);

Frees `iter` .

#### Parameters

iter | a PopplerStructureElementIter |

Since: 0.26

### poppler_structure_element_iter_get_child ()

    PopplerStructureElementIter *
    poppler_structure_element_iter_get_child
                                   (PopplerStructureElementIter *parent);

Returns a new iterator to the children elements of the PopplerStructureElement associated with `iter` . The returned value must be freed with `poppler_structure_element_iter_free()`.

#### Parameters

parent | a PopplerStructureElementIter |

#### Returns

a new PopplerStructureElementIter

Since: 0.26

### poppler_structure_element_iter_get_element ()

    PopplerStructureElement *
    poppler_structure_element_iter_get_element
                                   (PopplerStructureElementIter *iter);

Returns the PopplerStructureElementIter associated with `iter` .

#### Parameters

iter | a PopplerStructureElementIter |

#### Returns

a new PopplerStructureElementIter.

[transfer full]

Since: 0.26

### poppler_structure_element_get_kind ()

    PopplerStructureElementKind
    poppler_structure_element_get_kind (PopplerStructureElement *poppler_structure_element);

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A PopplerStructureElementKind value.

Since: 0.26

### poppler_structure_element_get_page ()

    gint
    poppler_structure_element_get_page (PopplerStructureElement *poppler_structure_element);

Obtains the page number in which the element is contained.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

Number of the page that contains the element, of

`-1` if not defined.

Since: 0.26

### poppler_structure_element_is_content ()

    gboolean
    poppler_structure_element_is_content (PopplerStructureElement *poppler_structure_element);

Checks whether an element is actual document content.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

`TRUE` if the element is content, or `FALSE` otherwise.

Since: 0.26

### poppler_structure_element_is_inline ()

    gboolean
    poppler_structure_element_is_inline (PopplerStructureElement *poppler_structure_element);

Checks whether an element is an inline element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

`TRUE` if the element is an inline element, or `FALSE` otherwise.

Since: 0.26

### poppler_structure_element_is_block ()

    gboolean
    poppler_structure_element_is_block (PopplerStructureElement *poppler_structure_element);

Checks whether an element is a block element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

`TRUE` if the element is a block element, or `FALSE` otherwise.

Since: 0.26

### poppler_structure_element_is_grouping ()

    gboolean
    poppler_structure_element_is_grouping (PopplerStructureElement *poppler_structure_element);

Checks whether an element is a grouping element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

`TRUE` if the element is a grouping element, `FALSE` otherwise.

Since: 0.26

### poppler_structure_element_get_id ()

    gchar *
    poppler_structure_element_get_id (PopplerStructureElement *poppler_structure_element);

Obtains the identifier of an element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

The identifier of the element (if defined), or `NULL`.

[transfer full]

Since: 0.26

### poppler_structure_element_get_title ()

    gchar *
    poppler_structure_element_get_title (PopplerStructureElement *poppler_structure_element);

Obtains the title of an element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

The title of the element, or `NULL`.

[transfer full]

Since: 0.26

### poppler_structure_element_get_abbreviation ()

    gchar *
    poppler_structure_element_get_abbreviation
                                   (PopplerStructureElement *poppler_structure_element);

### poppler_structure_element_get_language ()

    gchar *
    poppler_structure_element_get_language
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the language and country code for the content in an element, in two-letter ISO format, e.g. `en_ES`, or `NULL` if not defined.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

language and country code, or `NULL`.

[transfer full]

Since: 0.26

### poppler_structure_element_get_text ()

    gchar *
    poppler_structure_element_get_text (PopplerStructureElement *poppler_structure_element,
                                        PopplerStructureGetTextFlags flags);

Obtains the text enclosed by an element, or the text enclosed by the elements in the subtree (including the element itself).

#### Parameters

poppler_structure_element | A PopplerStructureElement |
flags | A PopplerStructureGetTextFlags value, or `POPPLER_STRUCTURE_GET_TEXT_NONE` to disable all the flags. |

#### Returns

A string.

[transfer full]

Since: 0.26

### poppler_structure_element_get_alt_text ()

    gchar *
    poppler_structure_element_get_alt_text
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the “alternate” text representation of the element (and its child elements). This is mostly used for non-text elements like images and figures, to specify a textual description of the element.

Note that for elements containing proper text, the function `poppler_structure_element_get_text()` must be used instead.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

The alternate text representation for the element, or `NULL` if not defined.

[transfer full]

Since: 0.26

### poppler_structure_element_get_actual_text ()

    gchar *
    poppler_structure_element_get_actual_text
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the actual text enclosed by the element (and its child elements). The actual text is mostly used for non-text elements like images and figures which do have the graphical appearance of text, like a logo. For those the actual text is the equivalent text to those graphical elements which look like text when rendered.

Note that for elements containing proper text, the function `poppler_structure_element_get_text()` must be used instead.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

The actual text for the element, or `NULL` if not defined.

[transfer full]

Since: 0.26

### poppler_structure_element_get_text_spans ()

    PopplerTextSpan **
    poppler_structure_element_get_text_spans
                                   (PopplerStructureElement *poppler_structure_element,
                                    guint *n_text_spans);

Obtains the text enclosed by an element, as an array of PopplerTextSpan structures. Each item in the list is a piece of text which share the same attributes, plus its attributes. The following example shows how to obtain and free the text spans of an element:

    guint i, n_spans;
    PopplerTextSpan **text_spans =
       poppler_structure_element_get_text_spans (element, &n_spans);
    /* Use the text spans */
    for (i = 0; i < n_spans; i++)
       poppler_text_span_free (text_spans[i]);
    g_free (text_spans);

#### Parameters

poppler_structure_element | A PopplerStructureElement |
n_text_spans | A pointer to the location where the number of elements in the returned array will be stored. | [out]

#### Returns

An array of PopplerTextSpan elments.

[transfer full][array length=n_text_spans][element-type PopplerTextSpan]

Since: 0.26

### poppler_structure_element_get_placement ()

    PopplerStructurePlacement
    poppler_structure_element_get_placement
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the placement type of the structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A PopplerStructurePlacement value.

Since: 0.26

### poppler_structure_element_get_writing_mode ()

    PopplerStructureWritingMode
    poppler_structure_element_get_writing_mode
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the writing mode (writing direction) of the content associated with a structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A PopplerStructureWritingMode value.

Since: 0.26

### poppler_structure_element_get_background_color ()

    gboolean
    poppler_structure_element_get_background_color
                                   (PopplerStructureElement *poppler_structure_element,
                                    PopplerColor *color);

Obtains the background color of the element. If this attribute is not specified, the element shall be treated as if it were transparent.

#### Parameters

poppler_structure_element | A PopplerStructureElement |
color | A PopplerColor. | [out]

#### Returns

`TRUE` if a color is defined for the element, `FALSE` otherwise.

Since: 0.26

### poppler_structure_element_get_border_color ()

    gboolean
    poppler_structure_element_get_border_color
                                   (PopplerStructureElement *poppler_structure_element,
                                    PopplerColor *colors);

Obtains the color of border around the element. The result values are in before-after-start-end ordering (for the typical Western left-to-right writing, that is top-bottom-left-right). If this attribute is not specified, the border color for this element shall be the current text fill color in effect at the start of its associated content.

#### Parameters

poppler_structure_element | A PopplerStructureElement |
colors | An array of four PopplerColor. | [out][array fixed-size=4][element-type PopplerColor]

#### Returns

`TRUE` if a color is defined for the element, `FALSE` otherwise.

Since: 0.26

### poppler_structure_element_get_border_style ()

    void
    poppler_structure_element_get_border_style
                                   (PopplerStructureElement *poppler_structure_element,
                                    PopplerStructureBorderStyle *border_styles);

Obtains the border style of a structure element. The result values are in before-after-start-end ordering. For example, using Western left-to-right writing, that is top-bottom-left-right.

#### Parameters

poppler_structure_element | A PopplerStructureElement |
border_styles | An array of four PopplerStructureBorderStyle elements. | [out][array fixed-size=4][element-type PopplerStructureBorderStyle]

Since: 0.26

### poppler_structure_element_get_border_thickness ()

    gboolean
    poppler_structure_element_get_border_thickness
                                   (PopplerStructureElement *poppler_structure_element,
                                    gdouble *border_thicknesses);

Obtains the thickness of the border of an element. The result values are in before-after-start-end ordering (for the typical Western left-to-right writing, that is top-bottom-left-right). A value of 0 indicates that the border shall not be drawn.

#### Parameters

poppler_structure_element | A PopplerStructureElement |
border_thicknesses | Array with the four values of border thicknesses. | [out][array fixed-size=4][element-type gdouble]

#### Returns

`TRUE` if the border thickness attribute is defined for the element, `FALSE` otherwise.

Since: 0.26

### poppler_structure_element_get_padding ()

    void
    poppler_structure_element_get_padding (PopplerStructureElement *poppler_structure_element,
                                           gdouble *paddings);

Obtains the padding of an element (space around it). The result values are in before-after-start-end ordering. For example using Western left-to-right writing, that is top-bottom-left-right.

#### Parameters

poppler_structure_element | A PopplerStructureElement |
paddings | Padding for the four sides of the element. | [out][array fixed-size=4][element-type gdouble]

Since: 0.26

### poppler_structure_element_get_color ()

    gboolean
    poppler_structure_element_get_color (PopplerStructureElement *poppler_structure_element,
                                         PopplerColor *color);

Obtains the color of the content contained in the element. If this attribute is not specified, the color for this element shall be the current text fill color in effect at the start of its associated content.

#### Parameters

poppler_structure_element | A PopplerStructureElement |
color | A PopplerColor. | [out]

#### Returns

`TRUE` if a color is defined for the element, `FALSE` otherwise.

Since: 0.26

### poppler_structure_element_get_space_before ()

    gdouble
    poppler_structure_element_get_space_before
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the amount of empty space before the block-level structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A positive value.

Since: 0.26

### poppler_structure_element_get_space_after ()

    gdouble
    poppler_structure_element_get_space_after
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the amount of empty space after the block-level structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A positive value.

Since: 0.26

### poppler_structure_element_get_start_indent ()

    gdouble
    poppler_structure_element_get_start_indent
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the amount of indentation at the beginning of the block-level structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A numeric value.

Since: 0.26

### poppler_structure_element_get_end_indent ()

    gdouble
    poppler_structure_element_get_end_indent
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the amount of indentation at the end of the block-level structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A numeric value.

Since: 0.26

### poppler_structure_element_get_text_indent ()

    gdouble
    poppler_structure_element_get_text_indent
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the amount of indentation of the text contained in the block-level structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A numeric value.

Since: 0.26

### poppler_structure_element_get_text_align ()

    PopplerStructureTextAlign
    poppler_structure_element_get_text_align
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the text alignment mode of the text contained into a block-level structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A PopplerStructureTextAlign value.

Since: 0.26

### poppler_structure_element_get_bounding_box ()

    gboolean
    poppler_structure_element_get_bounding_box
                                   (PopplerStructureElement *poppler_structure_element,
                                    PopplerRectangle *bounding_box);

Obtains the size of the bounding box of a block-level structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |
bounding_box | A PopplerRectangle. | [out]

#### Returns

`TRUE` if a bounding box is defined for the element, `FALSE` otherwise.

Since: 0.26

### poppler_structure_element_get_width ()

    gdouble
    poppler_structure_element_get_width (PopplerStructureElement *poppler_structure_element);

Obtains the width of the block-level structure element. Note that for elements which do not specify a width, it has to be calculated, and in this case -1 is returned.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A positive value if a width is defined, or -1 if the width is to be calculated automatically.

Since: 0.26

### poppler_structure_element_get_height ()

    gdouble
    poppler_structure_element_get_height (PopplerStructureElement *poppler_structure_element);

Obtains the height of the block-level structure element. Note that for elements which do not specify a height, it has to be calculated, and in this case -1 is returned.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A positive value if a width is defined, or -1 if the height is to be calculated automatically.

Since: 0.26

### poppler_structure_element_get_block_align ()

    PopplerStructureBlockAlign
    poppler_structure_element_get_block_align
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the block-alignment mode of the block-level structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A PopplerStructureBlockAlign value.

Since: 0.26

### poppler_structure_element_get_inline_align ()

    PopplerStructureInlineAlign
    poppler_structure_element_get_inline_align
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the inline-alignment mode of the block-level structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A PopplerStructureInlineAlign value.

Since: 0.26

### poppler_structure_element_get_table_border_style ()

    void
    poppler_structure_element_get_table_border_style
                                   (PopplerStructureElement *poppler_structure_element,
                                    PopplerStructureBorderStyle *border_styles);

Obtains the table cell border style of a block-level structure element. The result values are in before-after-start-end ordering. For example, using Western left-to-right writing, that is top-bottom-left-right.

#### Parameters

poppler_structure_element | A PopplerStructureElement |
border_styles | An array of four PopplerStructureBorderStyle elements. | [out][array fixed-size=4][element-type PopplerStructureBorderStyle]

Since: 0.26

### poppler_structure_element_get_table_padding ()

    void
    poppler_structure_element_get_table_padding
                                   (PopplerStructureElement *poppler_structure_element,
                                    gdouble *paddings);

Obtains the padding between the table cell’s content rectangle and the surrounding border of a block-level structure element. The result values are in before-after-start-end ordering (for the typical Western left-to-right writing, that is top-bottom-left-right).

#### Parameters

poppler_structure_element | A PopplerStructureElement |
paddings | Padding for the four sides of the element. | [out][array fixed-size=4][element-type gdouble]

Since: 0.26

### poppler_structure_element_get_baseline_shift ()

    gdouble
    poppler_structure_element_get_baseline_shift
                                   (PopplerStructureElement *poppler_structure_element);

Obtains how much the text contained in the inline-level structure element should be shifted, measuring from the baseline of the glyphs.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A numeric value.

Since: 0.26

### poppler_structure_element_get_line_height ()

    gdouble
    poppler_structure_element_get_line_height
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the line height for the text contained in the inline-level structure element. Note that for elements which do not specify a line height, it has to be calculated, and in this case -1 is returned.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A positive value if a line height is defined, or -1 if the height is to be calculated automatically.

Since: 0.26

### poppler_structure_element_get_text_decoration_color ()

    gboolean
    poppler_structure_element_get_text_decoration_color
                                   (PopplerStructureElement *poppler_structure_element,
                                    PopplerColor *color);

Obtains the color of the text decoration for the text contained in the inline-level structure element. If this attribute is not specified, the color for this element shall be the current fill color in effect at the start of its associated content.

#### Parameters

poppler_structure_element | A PopplerStructureElement |
color | A PopplerColor. | [out]

#### Returns

`TRUE` if a color is defined for the element, `FALSE` otherwise.

Since: 0.26

### poppler_structure_element_get_text_decoration_thickness ()

    gdouble
    poppler_structure_element_get_text_decoration_thickness
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the thickness of the text decoration for the text contained in the inline-level structure element. If this attribute is not specified, it shall be derived from the current stroke thickness in effect at the start of the element’s associated content.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

Thickness of the text decoration, or NAN if not defined.

Since: 0.26

### poppler_structure_element_get_text_decoration_type ()

    PopplerStructureTextDecoration
    poppler_structure_element_get_text_decoration_type
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the text decoration type of the text contained in the inline-level structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A PopplerStructureTextDecoration value.

Since: 0.26

### poppler_structure_element_get_ruby_align ()

    PopplerStructureRubyAlign
    poppler_structure_element_get_ruby_align
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the alignment for the ruby text contained in a inline-level structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A PopplerStructureRubyAlign value.

Since: 0.26

### poppler_structure_element_get_ruby_position ()

    PopplerStructureRubyPosition
    poppler_structure_element_get_ruby_position
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the position for the ruby text contained in a inline-level structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A PopplerStructureRubyPosition value.

Since: 0.26

### poppler_structure_element_get_glyph_orientation ()

    PopplerStructureGlyphOrientation
    poppler_structure_element_get_glyph_orientation
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the glyph orientation for the text contained in a inline-level structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A PopplerStructureGlyphOrientation value.

Since: 0.26

### poppler_structure_element_get_column_count ()

    guint
    poppler_structure_element_get_column_count
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the number of columns used to lay out the content contained in the grouping element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

Number of columns.

Since: 0.26

### poppler_structure_element_get_column_gaps ()

    gdouble *
    poppler_structure_element_get_column_gaps
                                   (PopplerStructureElement *poppler_structure_element,
                                    guint *n_values);

Obtains the size of the gaps in between adjacent columns. Returns an array of elements: the first one is the size of the gap in between columns 1 and 2, second is the size between columns 2 and 3, and so on.

For elements which use a single column, `NULL` is returned and `n_values` is set to zero.

If the attribute is undefined, `NULL` is returned and `n_values` is set to a non-zero value.

The array with the results is allocated by the function. When it is not needed anymore, be sure to call `g_free()` on it.

#### Parameters

poppler_structure_element | A PopplerStructureElement |
n_values | Size of the returned array. | [out]

#### Returns

Array containing the values for the column gaps, or `NULL` if the array is empty or the attribute is not defined.

[transfer full][array length=n_values][element-type gdouble]

Since: 0.26

### poppler_structure_element_get_column_widths ()

    gdouble *
    poppler_structure_element_get_column_widths
                                   (PopplerStructureElement *poppler_structure_element,
                                    guint *n_values);

Obtains an array with the widths of the columns.

The array with the results is allocated by the function. When it is not needed anymore, be sure to call `g_free()` on it.

#### Parameters

poppler_structure_element | A PopplerStructureElement |
n_values | Size of the returned array. | [out]

#### Returns

Array containing widths of the columns, or `NULL` if the attribute is not defined.

[transfer full][array length=n_values][element-type gdouble]

Since: 0.26

### poppler_structure_element_get_list_numbering ()

    PopplerStructureListNumbering
    poppler_structure_element_get_list_numbering
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the list numbering style for list items.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A PopplerStructureListNumbering value.

Since: 0.26

### poppler_structure_element_get_form_role ()

    PopplerStructureFormRole
    poppler_structure_element_get_form_role
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the role of a form structure element that is part of a form, or is a form field. This hints how the control for the element is intended to be rendered.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A PopplerStructureFormRole value.

Since: 0.26

### poppler_structure_element_get_form_state ()

    PopplerStructureFormState
    poppler_structure_element_get_form_state
                                   (PopplerStructureElement *poppler_structure_element);

For a structure element that is a form field, obtains in which state the associated control is expected to be rendered.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A PopplerStructureFormState value.

Since: 0.26

### poppler_structure_element_get_form_description ()

    gchar *
    poppler_structure_element_get_form_description
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the textual description of the form element. Note that the description is for informative purposes, and it is not intended to be rendered. For example, assistive technologies may use the description field to provide an alternate way of presenting an element to the user.

The returned string is allocated by the function. When it is not needed anymore, be sure to call `g_free()` on it.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A string, or `NULL` if the attribute is not defined.

[transfer full]

Since: 0.26

### poppler_structure_element_get_table_row_span ()

    guint
    poppler_structure_element_get_table_row_span
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the number of rows the table element spans to.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A positive, non-zero value.

Since: 0.26

### poppler_structure_element_get_table_column_span ()

    guint
    poppler_structure_element_get_table_column_span
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the number of columns the table element spans to.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A positive, non-zero value.

Since: 0.26

### poppler_structure_element_get_table_headers ()

    gchar **
    poppler_structure_element_get_table_headers
                                   (PopplerStructureElement *poppler_structure_element);

Obtains an array with the names of the table column headers. This is only useful for table header row elements.

The array with the results is allocated by the function. The number of items in the returned array can be obtained with `g_strv_length()`. The returned value must be freed using `g_strfreev()`.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

Zero-terminated array of strings with the table header names, or `NULL` if the attribute is not defined.

[transfer full][array zero-terminated=1][element-type gchar*]

Since: 0.26

### poppler_structure_element_get_table_scope ()

    PopplerStructureTableScope
    poppler_structure_element_get_table_scope
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the scope of a table structure element.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A PopplerStructureTableScope value.

Since: 0.26

### poppler_structure_element_get_table_summary ()

    gchar *
    poppler_structure_element_get_table_summary
                                   (PopplerStructureElement *poppler_structure_element);

Obtains the textual summary of the contents of the table element. Note that the summary is meant for informative purposes, and it is not intended to be rendered. For example, assistive technologies may use the description field to provide an alternate way of presenting an element to the user, or a document indexer may want to scan it for additional keywords.

The returned string is allocated by the function. When it is not needed anymore, be sure to call `g_free()` on it.

#### Parameters

poppler_structure_element | A PopplerStructureElement |

#### Returns

A string, or `NULL` if the attribute is not defined.

[transfer full]

Since: 0.26

### poppler_text_span_copy ()

    PopplerTextSpan *
    poppler_text_span_copy (PopplerTextSpan *poppler_text_span);

Makes a copy of a text span.

#### Parameters

poppler_text_span | a PopplerTextSpan |

#### Returns

A new PopplerTextSpan.

[transfer full]

Since: 0.26

### poppler_text_span_free ()

    void
    poppler_text_span_free (PopplerTextSpan *poppler_text_span);

Frees a text span.

#### Parameters

poppler_text_span | A PopplerTextSpan |

Since: 0.26

### poppler_text_span_is_fixed_width_font ()

    gboolean
    poppler_text_span_is_fixed_width_font (PopplerTextSpan *poppler_text_span);

Check wether a text span is meant to be rendered using a fixed-width font.

#### Parameters

poppler_text_span | a PopplerTextSpan |

#### Returns

Whether the span uses a fixed-width font.

Since: 0.26

### poppler_text_span_is_serif_font ()

    gboolean
    poppler_text_span_is_serif_font (PopplerTextSpan *poppler_text_span);

Check whether a text span is meant to be rendered using a serif font.

#### Parameters

poppler_text_span | a PopplerTextSpan |

#### Returns

Whether the span uses a serif font.

Since: 0.26

### poppler_text_span_is_bold_font ()

    gboolean
    poppler_text_span_is_bold_font (PopplerTextSpan *poppler_text_span);

Check whether a text span is meant to be rendered using a bold font.

#### Parameters

poppler_text_span | a PopplerTextSpan |

#### Returns

Whether the span uses bold font.

Since: 0.26

### poppler_text_span_get_color ()

    void
    poppler_text_span_get_color (PopplerTextSpan *poppler_text_span,
                                 PopplerColor *color);

Obtains the color in which the text is to be rendered.

#### Parameters

poppler_text_span | a PopplerTextSpan |
color | a return location for a PopplerColor. | [out]

Since: 0.26

### poppler_text_span_get_text ()

    const gchar *
    poppler_text_span_get_text (PopplerTextSpan *poppler_text_span);

Obtains the text contained in the span.

#### Parameters

poppler_text_span | a PopplerTextSpan |

#### Returns

A string.

[transfer none]

Since: 0.26

### poppler_text_span_get_font_name ()

    const gchar *
    poppler_text_span_get_font_name (PopplerTextSpan *poppler_text_span);

Obtains the name of the font in which the span is to be rendered.

#### Parameters

poppler_text_span | a PopplerTextSpan |

#### Returns

A string containing the font name, or `NULL` if a font is not defined.

[transfer none]

Since: 0.26

## Types and Values

### PopplerStructureElement

    typedef struct _PopplerStructureElement PopplerStructureElement;

### enum PopplerStructureElementKind

#### Members

POPPLER_STRUCTURE_ELEMENT_CONTENT |  |
POPPLER_STRUCTURE_ELEMENT_OBJECT_REFERENCE |  |
POPPLER_STRUCTURE_ELEMENT_DOCUMENT |  |
POPPLER_STRUCTURE_ELEMENT_PART |  |
POPPLER_STRUCTURE_ELEMENT_ARTICLE |  |
POPPLER_STRUCTURE_ELEMENT_SECTION |  |
POPPLER_STRUCTURE_ELEMENT_DIV |  |
POPPLER_STRUCTURE_ELEMENT_SPAN |  |
POPPLER_STRUCTURE_ELEMENT_QUOTE |  |
POPPLER_STRUCTURE_ELEMENT_NOTE |  |
POPPLER_STRUCTURE_ELEMENT_REFERENCE |  |
POPPLER_STRUCTURE_ELEMENT_BIBENTRY |  |
POPPLER_STRUCTURE_ELEMENT_CODE |  |
POPPLER_STRUCTURE_ELEMENT_LINK |  |
POPPLER_STRUCTURE_ELEMENT_ANNOT |  |
POPPLER_STRUCTURE_ELEMENT_BLOCKQUOTE |  |
POPPLER_STRUCTURE_ELEMENT_CAPTION |  |
POPPLER_STRUCTURE_ELEMENT_NONSTRUCT |  |
POPPLER_STRUCTURE_ELEMENT_TOC |  |
POPPLER_STRUCTURE_ELEMENT_TOC_ITEM |  |
POPPLER_STRUCTURE_ELEMENT_INDEX |  |
POPPLER_STRUCTURE_ELEMENT_PRIVATE |  |
POPPLER_STRUCTURE_ELEMENT_PARAGRAPH |  |
POPPLER_STRUCTURE_ELEMENT_HEADING |  |
POPPLER_STRUCTURE_ELEMENT_HEADING_1 |  |
POPPLER_STRUCTURE_ELEMENT_HEADING_2 |  |
POPPLER_STRUCTURE_ELEMENT_HEADING_3 |  |
POPPLER_STRUCTURE_ELEMENT_HEADING_4 |  |
POPPLER_STRUCTURE_ELEMENT_HEADING_5 |  |
POPPLER_STRUCTURE_ELEMENT_HEADING_6 |  |
POPPLER_STRUCTURE_ELEMENT_LIST |  |
POPPLER_STRUCTURE_ELEMENT_LIST_ITEM |  |
POPPLER_STRUCTURE_ELEMENT_LIST_LABEL |  |
POPPLER_STRUCTURE_ELEMENT_LIST_BODY |  |
POPPLER_STRUCTURE_ELEMENT_TABLE |  |
POPPLER_STRUCTURE_ELEMENT_TABLE_ROW |  |
POPPLER_STRUCTURE_ELEMENT_TABLE_HEADING |  |
POPPLER_STRUCTURE_ELEMENT_TABLE_DATA |  |
POPPLER_STRUCTURE_ELEMENT_TABLE_HEADER |  |
POPPLER_STRUCTURE_ELEMENT_TABLE_FOOTER |  |
POPPLER_STRUCTURE_ELEMENT_TABLE_BODY |  |
POPPLER_STRUCTURE_ELEMENT_RUBY |  |
POPPLER_STRUCTURE_ELEMENT_RUBY_BASE_TEXT |  |
POPPLER_STRUCTURE_ELEMENT_RUBY_ANNOT_TEXT |  |
POPPLER_STRUCTURE_ELEMENT_RUBY_PUNCTUATION |  |
POPPLER_STRUCTURE_ELEMENT_WARICHU |  |
POPPLER_STRUCTURE_ELEMENT_WARICHU_TEXT |  |
POPPLER_STRUCTURE_ELEMENT_WARICHU_PUNCTUATION |  |
POPPLER_STRUCTURE_ELEMENT_FIGURE |  |
POPPLER_STRUCTURE_ELEMENT_FORMULA |  |
POPPLER_STRUCTURE_ELEMENT_FORM |  |

### PopplerStructureElementIter

    typedef struct _PopplerStructureElementIter PopplerStructureElementIter;

### enum PopplerStructureGetTextFlags

#### Members

POPPLER_STRUCTURE_GET_TEXT_NONE | No flags. |
POPPLER_STRUCTURE_GET_TEXT_RECURSIVE | For non-leaf, non-content elements, recursively obtain the text from all the elements enclosed in the subtree. |

### enum PopplerStructurePlacement

#### Members

POPPLER_STRUCTURE_PLACEMENT_BLOCK |  |
POPPLER_STRUCTURE_PLACEMENT_INLINE |  |
POPPLER_STRUCTURE_PLACEMENT_BEFORE |  |
POPPLER_STRUCTURE_PLACEMENT_START |  |
POPPLER_STRUCTURE_PLACEMENT_END |  |

### enum PopplerStructureWritingMode

#### Members

POPPLER_STRUCTURE_WRITING_MODE_LR_TB |  |
POPPLER_STRUCTURE_WRITING_MODE_RL_TB |  |
POPPLER_STRUCTURE_WRITING_MODE_TB_RL |  |

### enum PopplerStructureBorderStyle

#### Members

POPPLER_STRUCTURE_BORDER_STYLE_NONE |  |
POPPLER_STRUCTURE_BORDER_STYLE_HIDDEN |  |
POPPLER_STRUCTURE_BORDER_STYLE_DOTTED |  |
POPPLER_STRUCTURE_BORDER_STYLE_DASHED |  |
POPPLER_STRUCTURE_BORDER_STYLE_SOLID |  |
POPPLER_STRUCTURE_BORDER_STYLE_DOUBLE |  |
POPPLER_STRUCTURE_BORDER_STYLE_GROOVE |  |
POPPLER_STRUCTURE_BORDER_STYLE_INSET |  |
POPPLER_STRUCTURE_BORDER_STYLE_OUTSET |  |

### enum PopplerStructureTextAlign

#### Members

POPPLER_STRUCTURE_TEXT_ALIGN_START |  |
POPPLER_STRUCTURE_TEXT_ALIGN_CENTER |  |
POPPLER_STRUCTURE_TEXT_ALIGN_END |  |
POPPLER_STRUCTURE_TEXT_ALIGN_JUSTIFY |  |

### enum PopplerStructureBlockAlign

#### Members

POPPLER_STRUCTURE_BLOCK_ALIGN_BEFORE |  |
POPPLER_STRUCTURE_BLOCK_ALIGN_MIDDLE |  |
POPPLER_STRUCTURE_BLOCK_ALIGN_AFTER |  |
POPPLER_STRUCTURE_BLOCK_ALIGN_JUSTIFY |  |

### enum PopplerStructureInlineAlign

#### Members

POPPLER_STRUCTURE_INLINE_ALIGN_START |  |
POPPLER_STRUCTURE_INLINE_ALIGN_CENTER |  |
POPPLER_STRUCTURE_INLINE_ALIGN_END |  |

### enum PopplerStructureTextDecoration

#### Members

POPPLER_STRUCTURE_TEXT_DECORATION_NONE |  |
POPPLER_STRUCTURE_TEXT_DECORATION_UNDERLINE |  |
POPPLER_STRUCTURE_TEXT_DECORATION_OVERLINE |  |
POPPLER_STRUCTURE_TEXT_DECORATION_LINETHROUGH |  |

### enum PopplerStructureRubyAlign

#### Members

POPPLER_STRUCTURE_RUBY_ALIGN_START |  |
POPPLER_STRUCTURE_RUBY_ALIGN_CENTER |  |
POPPLER_STRUCTURE_RUBY_ALIGN_END |  |
POPPLER_STRUCTURE_RUBY_ALIGN_JUSTIFY |  |
POPPLER_STRUCTURE_RUBY_ALIGN_DISTRIBUTE |  |

### enum PopplerStructureRubyPosition

#### Members

POPPLER_STRUCTURE_RUBY_POSITION_BEFORE |  |
POPPLER_STRUCTURE_RUBY_POSITION_AFTER |  |
POPPLER_STRUCTURE_RUBY_POSITION_WARICHU |  |
POPPLER_STRUCTURE_RUBY_POSITION_INLINE |  |

### enum PopplerStructureGlyphOrientation

#### Members

POPPLER_STRUCTURE_GLYPH_ORIENTATION_AUTO |  |
POPPLER_STRUCTURE_GLYPH_ORIENTATION_0 |  |
POPPLER_STRUCTURE_GLYPH_ORIENTATION_90 |  |
POPPLER_STRUCTURE_GLYPH_ORIENTATION_180 |  |
POPPLER_STRUCTURE_GLYPH_ORIENTATION_270 |  |

### enum PopplerStructureListNumbering

#### Members

POPPLER_STRUCTURE_LIST_NUMBERING_NONE |  |
POPPLER_STRUCTURE_LIST_NUMBERING_DISC |  |
POPPLER_STRUCTURE_LIST_NUMBERING_CIRCLE |  |
POPPLER_STRUCTURE_LIST_NUMBERING_SQUARE |  |
POPPLER_STRUCTURE_LIST_NUMBERING_DECIMAL |  |
POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ROMAN |  |
POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ROMAN |  |
POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ALPHA |  |
POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ALPHA |  |

### enum PopplerStructureTableScope

#### Members

POPPLER_STRUCTURE_TABLE_SCOPE_ROW |  |
POPPLER_STRUCTURE_TABLE_SCOPE_COLUMN |  |
POPPLER_STRUCTURE_TABLE_SCOPE_BOTH |  |

### enum PopplerStructureFormRole

#### Members

POPPLER_STRUCTURE_FORM_ROLE_UNDEFINED |  |
POPPLER_STRUCTURE_FORM_ROLE_RADIO_BUTTON |  |
POPPLER_STRUCTURE_FORM_ROLE_PUSH_BUTTON |  |
POPPLER_STRUCTURE_FORM_ROLE_TEXT_VALUE |  |
POPPLER_STRUCTURE_FORM_ROLE_CHECKBOX |  |

### enum PopplerStructureFormState

#### Members

POPPLER_STRUCTURE_FORM_STATE_ON |  |
POPPLER_STRUCTURE_FORM_STATE_OFF |  |
POPPLER_STRUCTURE_FORM_STATE_NEUTRAL |  |

### PopplerTextSpan

    typedef struct _PopplerTextSpan PopplerTextSpan;