get_text_spans


Description:

[ CCode ( array_length_pos = 0.1 , array_length_type = "guint" ) ]
[ Version ( since = "0.26" ) ]
public TextSpan[] get_text_spans ()

Obtains the text enclosed by an element, as an array of TextSpan 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:

this

A StructureElement

n_text_spans

A pointer to the location where the number of elements in the returned array will be stored.

Returns:

An array of TextSpan elements.