Class: Poppler::StructureElement
- Inherits:
-
Object
- Object
- Poppler::StructureElement
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#abbreviation ⇒ String
Acronyms and abbreviations contained in elements of type #POPPLER_STRUCTURE_ELEMENT_SPAN may have an associated expanded text form, which can be retrieved using this function.
-
#actual_text ⇒ String
Obtains the actual text enclosed by the element (and its child elements).
-
#alt_text ⇒ String
Obtains the “alternate” text representation of the element (and its child elements).
-
#baseline_shift ⇒ Float
Obtains how much the text contained in the inline-level structure element should be shifted, measuring from the baseline of the glyphs.
-
#block_align ⇒ Poppler::StructureBlockAlign
Obtains the block-alignment mode of the block-level structure element.
-
#column_count ⇒ Integer
Obtains the number of columns used to lay out the content contained in the grouping element.
-
#end_indent ⇒ Float
Obtains the amount of indentation at the end of the block-level structure element.
-
#form_description ⇒ String
Obtains the textual description of the form element.
-
#form_role ⇒ Poppler::StructureFormRole
Obtains the role of a form structure element that is part of a form, or is a form field.
-
#form_state ⇒ Poppler::StructureFormState
For a structure element that is a form field, obtains in which state the associated control is expected to be rendered.
-
#get_background_color(color) ⇒ Boolean
Obtains the background color of the element.
-
#get_border_color(colors) ⇒ Boolean
Obtains the color of border around the element.
-
#get_border_style(border_styles) ⇒ nil
Obtains the border style of a structure element.
-
#get_border_thickness(border_thicknesses) ⇒ Boolean
Obtains the thickness of the border of an element.
-
#get_bounding_box(bounding_box) ⇒ Boolean
Obtains the size of the bounding box of a block-level structure element.
-
#get_color(color) ⇒ Boolean
Obtains the color of the content contained in the element.
-
#get_column_gaps(n_values) ⇒ Array<Float>
Obtains the size of the gaps in between adjacent columns.
-
#get_column_widths(n_values) ⇒ Array<Float>
Obtains an array with the widths of the columns.
-
#get_padding(paddings) ⇒ nil
Obtains the padding of an element (space around it).
-
#get_table_border_style(border_styles) ⇒ nil
Obtains the table cell border style of a block-level structure element.
-
#get_table_padding(paddings) ⇒ nil
Obtains the padding between the table cell’s content rectangle and the surrounding border of a block-level structure element.
-
#get_text(flags) ⇒ String
Obtains the text enclosed by an element, or the text enclosed by the elements in the subtree (including the element itself).
-
#get_text_decoration_color(color) ⇒ Boolean
Obtains the color of the text decoration for the text contained in the inline-level structure element.
-
#get_text_spans(n_text_spans) ⇒ Array<Poppler::TextSpan>
Obtains the text enclosed by an element, as an array of Poppler::TextSpan structures.
-
#glyph_orientation ⇒ Poppler::StructureGlyphOrientation
Obtains the glyph orientation for the text contained in a inline-level structure element.
-
#height ⇒ Float
Obtains the height of the block-level structure element.
-
#id ⇒ String
Obtains the identifier of an element.
-
#inline_align ⇒ Poppler::StructureInlineAlign
Obtains the inline-alignment mode of the block-level structure element.
-
#is_block ⇒ Boolean
Checks whether an element is a block element.
-
#is_content ⇒ Boolean
Checks whether an element is actual document content.
-
#is_grouping ⇒ Boolean
Checks whether an element is a grouping element.
-
#is_inline ⇒ Boolean
Checks whether an element is an inline element.
-
#kind ⇒ Poppler::StructureElementKind
A Poppler::StructureElementKind value.
-
#language ⇒ String
Obtains the language and country code for the content in an element, in two-letter ISO format, e.g.
-
#line_height ⇒ Float
Obtains the line height for the text contained in the inline-level structure element.
-
#list_numbering ⇒ Poppler::StructureListNumbering
Obtains the list numbering style for list items.
-
#page ⇒ Integer
Obtains the page number in which the element is contained.
-
#placement ⇒ Poppler::StructurePlacement
Obtains the placement type of the structure element.
-
#ruby_align ⇒ Poppler::StructureRubyAlign
Obtains the alignment for the ruby text contained in a inline-level structure element.
-
#ruby_position ⇒ Poppler::StructureRubyPosition
Obtains the position for the ruby text contained in a inline-level structure element.
-
#space_after ⇒ Float
Obtains the amount of empty space after the block-level structure element.
-
#space_before ⇒ Float
Obtains the amount of empty space before the block-level structure element.
-
#start_indent ⇒ Float
Obtains the amount of indentation at the beginning of the block-level structure element.
-
#table_column_span ⇒ Integer
Obtains the number of columns the table element spans to.
-
#table_headers ⇒ Array<String>
Obtains an array with the names of the table column headers.
-
#table_row_span ⇒ Integer
Obtains the number of rows the table element spans to.
-
#table_scope ⇒ Poppler::StructureTableScope
Obtains the scope of a table structure element.
-
#table_summary ⇒ String
Obtains the textual summary of the contents of the table element.
-
#text_align ⇒ Poppler::StructureTextAlign
Obtains the text alignment mode of the text contained into a block-level structure element.
-
#text_decoration_thickness ⇒ Float
Obtains the thickness of the text decoration for the text contained in the inline-level structure element.
-
#text_decoration_type ⇒ Poppler::StructureTextDecoration
Obtains the text decoration type of the text contained in the inline-level structure element.
-
#text_indent ⇒ Float
Obtains the amount of indentation of the text contained in the block-level structure element.
-
#title ⇒ String
Obtains the title of an element.
-
#width ⇒ Float
Obtains the width of the block-level structure element.
-
#writing_mode ⇒ Poppler::StructureWritingMode
Obtains the writing mode (writing direction) of the content associated with a structure element.
Instance Method Details
#abbreviation ⇒ String
Acronyms and abbreviations contained in elements of type #POPPLER_STRUCTURE_ELEMENT_SPAN may have an associated expanded text form, which can be retrieved using this function.
#actual_text ⇒ String
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.
#alt_text ⇒ String
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.
#baseline_shift ⇒ Float
Obtains how much the text contained in the inline-level structure element should be shifted, measuring from the baseline of the glyphs.
#block_align ⇒ Poppler::StructureBlockAlign
Obtains the block-alignment mode of the block-level structure element.
#column_count ⇒ Integer
Obtains the number of columns used to lay out the content contained in the grouping element.
#end_indent ⇒ Float
Obtains the amount of indentation at the end of the block-level structure element.
#form_description ⇒ String
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.
#form_role ⇒ Poppler::StructureFormRole
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.
#form_state ⇒ Poppler::StructureFormState
For a structure element that is a form field, obtains in which state the associated control is expected to be rendered.
#get_background_color(color) ⇒ Boolean
Obtains the background color of the element. If this attribute is not specified, the element shall be treated as if it were transparent.
#get_border_color(colors) ⇒ Boolean
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.
#get_border_style(border_styles) ⇒ nil
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.
#get_border_thickness(border_thicknesses) ⇒ Boolean
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.
#get_bounding_box(bounding_box) ⇒ Boolean
Obtains the size of the bounding box of a block-level structure element.
#get_color(color) ⇒ Boolean
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.
#get_column_gaps(n_values) ⇒ Array<Float>
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, nil is returned and n_values is set to zero.
If the attribute is undefined, nil 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.
#get_column_widths(n_values) ⇒ Array<Float>
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.
#get_padding(paddings) ⇒ nil
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.
#get_table_border_style(border_styles) ⇒ nil
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.
#get_table_padding(paddings) ⇒ nil
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).
#get_text(flags) ⇒ String
Obtains the text enclosed by an element, or the text enclosed by the elements in the subtree (including the element itself).
#get_text_decoration_color(color) ⇒ Boolean
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.
#get_text_spans(n_text_spans) ⇒ Array<Poppler::TextSpan>
Obtains the text enclosed by an element, as an array of Poppler::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);
#glyph_orientation ⇒ Poppler::StructureGlyphOrientation
Obtains the glyph orientation for the text contained in a inline-level structure element.
#height ⇒ Float
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.
#id ⇒ String
Obtains the identifier of an element.
#inline_align ⇒ Poppler::StructureInlineAlign
Obtains the inline-alignment mode of the block-level structure element.
#is_block ⇒ Boolean
Checks whether an element is a block element.
#is_content ⇒ Boolean
Checks whether an element is actual document content.
#is_grouping ⇒ Boolean
Checks whether an element is a grouping element.
#is_inline ⇒ Boolean
Checks whether an element is an inline element.
#kind ⇒ Poppler::StructureElementKind
Returns A Poppler::StructureElementKind value.
#language ⇒ String
Obtains the language and country code for the content in an element, in two-letter ISO format, e.g. en_ES, or nil if not defined.
#line_height ⇒ Float
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.
#list_numbering ⇒ Poppler::StructureListNumbering
Obtains the list numbering style for list items.
#page ⇒ Integer
Obtains the page number in which the element is contained.
#placement ⇒ Poppler::StructurePlacement
Obtains the placement type of the structure element.
#ruby_align ⇒ Poppler::StructureRubyAlign
Obtains the alignment for the ruby text contained in a inline-level structure element.
#ruby_position ⇒ Poppler::StructureRubyPosition
Obtains the position for the ruby text contained in a inline-level structure element.
#space_after ⇒ Float
Obtains the amount of empty space after the block-level structure element.
#space_before ⇒ Float
Obtains the amount of empty space before the block-level structure element.
#start_indent ⇒ Float
Obtains the amount of indentation at the beginning of the block-level structure element.
#table_column_span ⇒ Integer
Obtains the number of columns the table element spans to.
#table_headers ⇒ Array<String>
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().
#table_row_span ⇒ Integer
Obtains the number of rows the table element spans to.
#table_scope ⇒ Poppler::StructureTableScope
Obtains the scope of a table structure element.
#table_summary ⇒ String
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.
#text_align ⇒ Poppler::StructureTextAlign
Obtains the text alignment mode of the text contained into a block-level structure element.
#text_decoration_thickness ⇒ Float
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.
#text_decoration_type ⇒ Poppler::StructureTextDecoration
Obtains the text decoration type of the text contained in the inline-level structure element.
#text_indent ⇒ Float
Obtains the amount of indentation of the text contained in the block-level structure element.
#title ⇒ String
Obtains the title of an element.
#width ⇒ Float
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.
#writing_mode ⇒ Poppler::StructureWritingMode
Obtains the writing mode (writing direction) of the content associated with a structure element.