PopplerPage: Poppler Reference Manual

## PopplerPage PopplerPage — Information about a page in a document |

## Functions

PopplerAnnotMapping * | poppler_annot_mapping_copy ()
void | poppler_annot_mapping_free ()
PopplerAnnotMapping * | poppler_annot_mapping_new ()
PopplerFormFieldMapping * | poppler_form_field_mapping_copy ()
void | poppler_form_field_mapping_free ()
PopplerFormFieldMapping * | poppler_form_field_mapping_new ()
PopplerImageMapping * | poppler_image_mapping_copy ()
void | poppler_image_mapping_free ()
PopplerImageMapping * | poppler_image_mapping_new ()
PopplerLinkMapping * | poppler_link_mapping_copy ()
void | poppler_link_mapping_free ()
PopplerLinkMapping * | poppler_link_mapping_new ()
void | poppler_page_add_annot ()
GList * | poppler_page_find_text ()
GList * | poppler_page_find_text_with_options ()
void | poppler_page_free_annot_mapping ()
void | poppler_page_free_form_field_mapping ()
void | poppler_page_free_image_mapping ()
void | poppler_page_free_link_mapping ()
void | poppler_page_free_text_attributes ()
GList * | poppler_page_get_annot_mapping ()
gboolean | poppler_page_get_bounding_box ()
void | poppler_page_get_crop_box ()
double | poppler_page_get_duration ()
GList * | poppler_page_get_form_field_mapping ()
cairo_surface_t * | poppler_page_get_image ()
GList * | poppler_page_get_image_mapping ()
int | poppler_page_get_index ()
gchar * | poppler_page_get_label ()
GList * | poppler_page_get_link_mapping ()
cairo_region_t * | poppler_page_get_selected_region ()
char * | poppler_page_get_selected_text ()
GList * | poppler_page_get_selection_region ()
void | poppler_page_get_size ()
char * | poppler_page_get_text ()
GList * | poppler_page_get_text_attributes ()
GList * | poppler_page_get_text_attributes_for_area ()
char * | poppler_page_get_text_for_area ()
gboolean | poppler_page_get_text_layout ()
gboolean | poppler_page_get_text_layout_for_area ()
cairo_surface_t * | poppler_page_get_thumbnail ()
gboolean | poppler_page_get_thumbnail_size ()
PopplerPageTransition * | poppler_page_get_transition ()
void | poppler_page_remove_annot ()
void | poppler_page_render ()
void | poppler_page_render_for_printing ()
void | poppler_page_render_for_printing_with_options ()
void | poppler_page_render_selection ()
void | poppler_page_render_to_ps ()
void | poppler_page_selection_region_free ()
PopplerPageTransition * | poppler_page_transition_copy ()
void | poppler_page_transition_free ()
PopplerPageTransition * | poppler_page_transition_new ()
PopplerPoint * | poppler_point_copy ()
void | poppler_point_free ()
PopplerPoint * | poppler_point_new ()
PopplerQuadrilateral * | poppler_quadrilateral_copy ()
void | poppler_quadrilateral_free ()
PopplerQuadrilateral * | poppler_quadrilateral_new ()
PopplerRectangle * | poppler_rectangle_copy ()
gboolean | poppler_rectangle_find_get_match_continued ()
gboolean | poppler_rectangle_find_get_ignored_hyphen ()
void | poppler_rectangle_free ()
PopplerRectangle * | poppler_rectangle_new ()
PopplerTextAttributes * | poppler_text_attributes_copy ()
void | poppler_text_attributes_free ()
PopplerTextAttributes * | poppler_text_attributes_new ()

## Properties

char * | label | Read

## Types and Values

| PopplerAnnotMapping
enum | PopplerFindFlags
| PopplerFormFieldMapping
| PopplerImageMapping
| PopplerLinkMapping
| PopplerPage
| PopplerPageTransition
enum | PopplerPageTransitionAlignment
enum | PopplerPageTransitionDirection
enum | PopplerPageTransitionType
| PopplerPoint
enum | PopplerPrintFlags
| PopplerQuadrilateral
| PopplerRectangle
enum | PopplerSelectionStyle
| PopplerTextAttributes

## Object Hierarchy

        GBoxed
        ├── PopplerAnnotMapping
        ├── PopplerFormFieldMapping
        ├── PopplerImageMapping
        ├── PopplerLinkMapping
        ├── PopplerPageTransition
        ├── PopplerPoint
        ├── PopplerQuadrilateral
        ├── PopplerRectangle
        ╰── PopplerTextAttributes
        GEnum
        ├── PopplerPageTransitionAlignment
        ├── PopplerPageTransitionDirection
        ├── PopplerPageTransitionType
        ╰── PopplerSelectionStyle
        GFlags
        ├── PopplerFindFlags
        ╰── PopplerPrintFlags
        GObject
        ╰── PopplerPage

## Includes

    #include <poppler.h>

## Description

## Functions

### poppler_annot_mapping_copy ()

    PopplerAnnotMapping *
    poppler_annot_mapping_copy (PopplerAnnotMapping *mapping);

Creates a copy of `mapping`

#### Parameters

mapping | a PopplerAnnotMapping to copy |

#### Returns

a new allocated copy of `mapping`

### poppler_annot_mapping_free ()

    void
    poppler_annot_mapping_free (PopplerAnnotMapping *mapping);

Frees the given PopplerAnnotMapping

#### Parameters

mapping | a PopplerAnnotMapping |

### poppler_annot_mapping_new ()

    PopplerAnnotMapping *
    poppler_annot_mapping_new (void);

Creates a new PopplerAnnotMapping

#### Returns

a new PopplerAnnotMapping, use `poppler_annot_mapping_free()` to free it

### poppler_form_field_mapping_copy ()

    PopplerFormFieldMapping *
    poppler_form_field_mapping_copy (PopplerFormFieldMapping *mapping);

Creates a copy of `mapping`

#### Parameters

mapping | a PopplerFormFieldMapping to copy |

#### Returns

a new allocated copy of `mapping`

### poppler_form_field_mapping_free ()

    void
    poppler_form_field_mapping_free (PopplerFormFieldMapping *mapping);

Frees the given PopplerFormFieldMapping

#### Parameters

mapping | a PopplerFormFieldMapping |

### poppler_form_field_mapping_new ()

    PopplerFormFieldMapping *
    poppler_form_field_mapping_new (void);

Creates a new PopplerFormFieldMapping

#### Returns

a new PopplerFormFieldMapping, use `poppler_form_field_mapping_free()` to free it

### poppler_image_mapping_copy ()

    PopplerImageMapping *
    poppler_image_mapping_copy (PopplerImageMapping *mapping);

Creates a copy of `mapping`

#### Parameters

mapping | a PopplerImageMapping to copy |

#### Returns

a new allocated copy of `mapping`

### poppler_image_mapping_free ()

    void
    poppler_image_mapping_free (PopplerImageMapping *mapping);

Frees the given PopplerImageMapping

#### Parameters

mapping | a PopplerImageMapping |

### poppler_image_mapping_new ()

    PopplerImageMapping *
    poppler_image_mapping_new (void);

Creates a new PopplerImageMapping

#### Returns

a new PopplerImageMapping, use `poppler_image_mapping_free()` to free it

### poppler_link_mapping_copy ()

    PopplerLinkMapping *
    poppler_link_mapping_copy (PopplerLinkMapping *mapping);

Creates a copy of `mapping`

#### Parameters

mapping | a PopplerLinkMapping to copy |

#### Returns

a new allocated copy of `mapping`

### poppler_link_mapping_free ()

    void
    poppler_link_mapping_free (PopplerLinkMapping *mapping);

Frees the given PopplerLinkMapping

#### Parameters

mapping | a PopplerLinkMapping |

### poppler_link_mapping_new ()

    PopplerLinkMapping *
    poppler_link_mapping_new (void);

Creates a new PopplerLinkMapping

#### Returns

a new PopplerLinkMapping, use `poppler_link_mapping_free()` to free it

### poppler_page_add_annot ()

    void
    poppler_page_add_annot (PopplerPage *page,
                            PopplerAnnot *annot);

Adds annotation `annot` to `page` .

#### Parameters

page | a PopplerPage |
annot | a PopplerAnnot to add |

Since: 0.16

### poppler_page_find_text ()

    GList *
    poppler_page_find_text (PopplerPage *page,
                            const char *text);

Finds `text` in `page` with the default options (`POPPLER_FIND_DEFAULT`) and returns a GList of rectangles for each occurrence of the text on the page. The coordinates are in PDF points.

#### Parameters

page | a PopplerPage |
text | the text to search for (UTF-8 encoded) |

#### Returns

a GList of PopplerRectangle,.

[element-type PopplerRectangle][transfer full]

### poppler_page_find_text_with_options ()

    GList *
    poppler_page_find_text_with_options (PopplerPage *page,
                                         const char *text,
                                         PopplerFindFlags options);

Finds `text` in `page` with the given PopplerFindFlags options and returns a GList of rectangles for each occurrence of the text on the page. The coordinates are in PDF points.

When `POPPLER_FIND_MULTILINE` is passed in `options` , matches may span more than one line. In this case, the returned list will contain one PopplerRectangle for each part of a match. The function `poppler_rectangle_find_get_match_continued()` will return `TRUE` for all rectangles belonging to the same match, except for the last one. If a hyphen was ignored at the end of the part of the match, `poppler_rectangle_find_get_ignored_hyphen()` will return `TRUE` for that rectangle.

Note that currently matches spanning more than two lines are not found. (This limitation may be lifted in a future version.)

Note also that currently finding multi-line matches backwards is not implemented; if you pass `POPPLER_FIND_BACKWARDS` and `POPPLER_FIND_MULTILINE` together, `POPPLER_FIND_MULTILINE` will be ignored.

#### Parameters

page | a PopplerPage |
text | the text to search for (UTF-8 encoded) |
options | find options |

#### Returns

a newly allocated list of newly allocated PopplerRectangle. Free with `g_list_free_full()` using `poppler_rectangle_free()`.

[element-type PopplerRectangle][transfer full]

Since: 0.22

### poppler_page_free_annot_mapping ()

    void
    poppler_page_free_annot_mapping (GList *list);

Frees a list of PopplerAnnotMappings allocated by `poppler_page_get_annot_mapping()`. It also unreferences the PopplerAnnots that each mapping contains, so if you want to keep them around, you need to reference them with `g_object_ref()`.

#### Parameters

list | A list of PopplerAnnotMappings. | [element-type PopplerAnnotMapping]

### poppler_page_free_form_field_mapping ()

    void
    poppler_page_free_form_field_mapping (GList *list);

Frees a list of PopplerFormFieldMappings allocated by `poppler_page_get_form_field_mapping()`.

#### Parameters

list | A list of PopplerFormFieldMappings. | [element-type PopplerFormFieldMapping]

### poppler_page_free_image_mapping ()

    void
    poppler_page_free_image_mapping (GList *list);

Frees a list of PopplerImageMappings allocated by `poppler_page_get_image_mapping()`.

#### Parameters

list | A list of PopplerImageMappings. | [element-type PopplerImageMapping]

### poppler_page_free_link_mapping ()

    void
    poppler_page_free_link_mapping (GList *list);

Frees a list of PopplerLinkMappings allocated by `poppler_page_get_link_mapping()`. It also frees the PopplerActions that each mapping contains, so if you want to keep them around, you need to copy them with `poppler_action_copy()`.

#### Parameters

list | A list of PopplerLinkMappings. | [element-type PopplerLinkMapping]

### poppler_page_free_text_attributes ()

    void
    poppler_page_free_text_attributes (GList *list);

Frees a list of PopplerTextAttributess allocated by `poppler_page_get_text_attributes()`.

#### Parameters

list | A list of PopplerTextAttributess. | [element-type PopplerTextAttributes]

Since: 0.18

### poppler_page_get_annot_mapping ()

    GList *
    poppler_page_get_annot_mapping (PopplerPage *page);

Returns a list of PopplerAnnotMapping items that map from a location on `page` to a PopplerAnnot. This list must be freed with `poppler_page_free_annot_mapping()` when done.

#### Parameters

page | A PopplerPage |

#### Returns

A GList of PopplerAnnotMapping.

[element-type PopplerAnnotMapping][transfer full]

### poppler_page_get_bounding_box ()

    gboolean
    poppler_page_get_bounding_box (PopplerPage *page,
                                   PopplerRectangle *rect);

### poppler_page_get_crop_box ()

    void
    poppler_page_get_crop_box (PopplerPage *page,
                               PopplerRectangle *rect);

Retrurns the crop box of `page`

#### Parameters

page | a PopplerPage |
rect | a PopplerRectangle to fill. | [out]

### poppler_page_get_duration ()

    double
    poppler_page_get_duration (PopplerPage *page);

Returns the duration of `page`

#### Parameters

page | a PopplerPage |

#### Returns

duration in seconds of `page` or -1.

### poppler_page_get_form_field_mapping ()

    GList *
    poppler_page_get_form_field_mapping (PopplerPage *page);

Returns a list of PopplerFormFieldMapping items that map from a location on `page` to a form field. This list must be freed with `poppler_page_free_form_field_mapping()` when done.

#### Parameters

page | A PopplerPage |

#### Returns

A GList of PopplerFormFieldMapping.

[element-type PopplerFormFieldMapping][transfer full]

### poppler_page_get_image ()

    cairo_surface_t *
    poppler_page_get_image (PopplerPage *page,
                            gint image_id);

Returns a cairo surface for the image of the `page`

#### Parameters

page | A PopplerPage |
image_id | The image identifier |

#### Returns

A cairo surface for the image

### poppler_page_get_image_mapping ()

    GList *
    poppler_page_get_image_mapping (PopplerPage *page);

Returns a list of PopplerImageMapping items that map from a location on `page` to an image of the page. This list must be freed with `poppler_page_free_image_mapping()` when done.

#### Parameters

page | A PopplerPage |

#### Returns

A GList of PopplerImageMapping.

[element-type PopplerImageMapping][transfer full]

### poppler_page_get_index ()

    int
    poppler_page_get_index (PopplerPage *page);

Returns the index of `page`

#### Parameters

page | a PopplerPage |

#### Returns

index value of `page`

### poppler_page_get_label ()

    gchar *
    poppler_page_get_label (PopplerPage *page);

Returns the label of `page` . Note that page labels and page indices might not coincide.

#### Parameters

page | a PopplerPage |

#### Returns

a new allocated string containing the label of `page` , or `NULL` if `page` doesn't have a label

Since: 0.16

### poppler_page_get_link_mapping ()

    GList *
    poppler_page_get_link_mapping (PopplerPage *page);

Returns a list of PopplerLinkMapping items that map from a location on `page` to a PopplerAction. This list must be freed with `poppler_page_free_link_mapping()` when done.

#### Parameters

page | A PopplerPage |

#### Returns

A GList of PopplerLinkMapping.

[element-type PopplerLinkMapping][transfer full]

### poppler_page_get_selected_region ()

    cairo_region_t *
    poppler_page_get_selected_region (PopplerPage *page,
                                      gdouble scale,
                                      PopplerSelectionStyle style,
                                      PopplerRectangle *selection);

Returns a region containing the area that would be rendered by `poppler_page_render_selection()`. The returned region must be freed with `cairo_region_destroy()`

#### Parameters

page | a PopplerPage |
scale | scale specified as pixels per point |
style | a PopplerSelectionStyle |
selection | start and end point of selection as a rectangle |

#### Returns

a cairo_region_t.

[transfer full]

Since: 0.16

### poppler_page_get_selected_text ()

    char *
    poppler_page_get_selected_text (PopplerPage *page,
                                    PopplerSelectionStyle style,
                                    PopplerRectangle *selection);

Retrieves the contents of the specified `selection` as text.

#### Parameters

page | a PopplerPage |
style | a PopplerSelectionStyle |
selection | the PopplerRectangle including the text |

#### Returns

a pointer to the contents of the `selection` as a string

Since: 0.16

### poppler_page_get_selection_region ()

    GList *
    poppler_page_get_selection_region (PopplerPage *page,
                                       gdouble scale,
                                       PopplerSelectionStyle style,
                                       PopplerRectangle *selection);

`poppler_page_get_selection_region` has been deprecated since version 0.16 and should not be used in newly-written code.

Use `poppler_page_get_selected_region()` instead.

Returns a region containing the area that would be rendered by `poppler_page_render_selection()` as a GList of PopplerRectangle. The returned list must be freed with `poppler_page_selection_region_free()`.

#### Parameters

page | a PopplerPage |
scale | scale specified as pixels per point |
style | a PopplerSelectionStyle |
selection | start and end point of selection as a rectangle |

#### Returns

a GList of PopplerRectangle.

[element-type PopplerRectangle][transfer full]

### poppler_page_get_size ()

    void
    poppler_page_get_size (PopplerPage *page,
                           double *width,
                           double *height);

Gets the size of `page` at the current scale and rotation.

#### Parameters

page | A PopplerPage |
width | return location for the width of `page` . | [out][allow-none]
height | return location for the height of `page` . | [out][allow-none]

### poppler_page_get_text ()

    char *
    poppler_page_get_text (PopplerPage *page);

Retrieves the text of `page` .

#### Parameters

page | a PopplerPage |

#### Returns

a pointer to the text of the `page` as a string

Since: 0.16

### poppler_page_get_text_attributes ()

    GList *
    poppler_page_get_text_attributes (PopplerPage *page);

Obtains the attributes of the text as a GList of PopplerTextAttributes. This list must be freed with `poppler_page_free_text_attributes()` when done.

Each list element is a PopplerTextAttributes struct where start_index and end_index indicates the range of text (as returned by `poppler_page_get_text()`) to which text attributes apply.

See also `poppler_page_get_text_attributes_for_area()`

#### Parameters

page | A PopplerPage |

#### Returns

A GList of PopplerTextAttributes.

[element-type PopplerTextAttributes][transfer full]

Since: 0.18

### poppler_page_get_text_attributes_for_area ()

    GList *
    poppler_page_get_text_attributes_for_area
                                   (PopplerPage *page,
                                    PopplerRectangle *area);

Obtains the attributes of the text in `area` as a GList of PopplerTextAttributes. This list must be freed with `poppler_page_free_text_attributes()` when done.

Each list element is a PopplerTextAttributes struct where start_index and end_index indicates the range of text (as returned by `poppler_page_get_text_for_area()`) to which text attributes apply.

#### Parameters

page | A PopplerPage |
area | a PopplerRectangle |

#### Returns

A GList of PopplerTextAttributes.

[element-type PopplerTextAttributes][transfer full]

Since: 0.26

### poppler_page_get_text_for_area ()

    char *
    poppler_page_get_text_for_area (PopplerPage *page,
                                    PopplerRectangle *area);

Retrieves the text of `page` contained in `area` .

#### Parameters

page | a PopplerPage |
area | a PopplerRectangle |

#### Returns

a pointer to the text as a string

Since: 0.26

### poppler_page_get_text_layout ()

    gboolean
    poppler_page_get_text_layout (PopplerPage *page,
                                  PopplerRectangle **rectangles,
                                  guint *n_rectangles);

Obtains the layout of the text as a list of PopplerRectangle This array must be freed with `g_free()` when done.

The position in the array represents an offset in the text returned by `poppler_page_get_text()`

See also `poppler_page_get_text_layout_for_area()`.

#### Parameters

page | A PopplerPage |
rectangles | return location for an array of PopplerRectangle. | [out][array length=n_rectangles][transfer container]
n_rectangles | length of returned array. | [out]

#### Returns

`TRUE` if the page contains text, `FALSE` otherwise

Since: 0.16

### poppler_page_get_text_layout_for_area ()

    gboolean
    poppler_page_get_text_layout_for_area (PopplerPage *page,
                                           PopplerRectangle *area,
                                           PopplerRectangle **rectangles,
                                           guint *n_rectangles);

Obtains the layout of the text contained in `area` as a list of PopplerRectangle This array must be freed with `g_free()` when done.

The position in the array represents an offset in the text returned by `poppler_page_get_text_for_area()`

#### Parameters

page | A PopplerPage |
area | a PopplerRectangle |
rectangles | return location for an array of PopplerRectangle. | [out][array length=n_rectangles][transfer container]
n_rectangles | length of returned array. | [out]

#### Returns

`TRUE` if the page contains text, `FALSE` otherwise

Since: 0.26

### poppler_page_get_thumbnail ()

    cairo_surface_t *
    poppler_page_get_thumbnail (PopplerPage *page);

Get the embedded thumbnail for the specified page. If the document doesn't have an embedded thumbnail for the page, this function returns `NULL`.

#### Parameters

page | the PopplerPage to get the thumbnail for |

#### Returns

the tumbnail as a cairo_surface_t or `NULL` if the document doesn't have a thumbnail for this page.

### poppler_page_get_thumbnail_size ()

    gboolean
    poppler_page_get_thumbnail_size (PopplerPage *page,
                                     int *width,
                                     int *height);

Returns `TRUE` if `page` has a thumbnail associated with it. It also fills in `width` and `height` with the width and height of the thumbnail. The values of width and height are not changed if no appropriate thumbnail exists.

#### Parameters

page | A PopplerPage |
width | return location for width. | [out]
height | return location for height. | [out]

#### Returns

`TRUE`, if `page` has a thumbnail associated with it.

### poppler_page_get_transition ()

    PopplerPageTransition *
    poppler_page_get_transition (PopplerPage *page);

Returns the transition effect of `page`

#### Parameters

page | a PopplerPage |

#### Returns

a PopplerPageTransition or `NULL`.

### poppler_page_remove_annot ()

    void
    poppler_page_remove_annot (PopplerPage *page,
                               PopplerAnnot *annot);

Removes annotation `annot` from `page`

#### Parameters

page | a PopplerPage |
annot | a PopplerAnnot to remove |

Since: 0.22

### poppler_page_render ()

    void
    poppler_page_render (PopplerPage *page,
                         cairo_t *cairo);

Render the page to the given cairo context. This function is for rendering a page that will be displayed. If you want to render a page that will be printed use `poppler_page_render_for_printing()` instead. Please see the documentation for that function for the differences between rendering to the screen and rendering to a printer.

#### Parameters

page | the page to render from |
cairo | cairo context to render to |

### poppler_page_render_for_printing ()

    void
    poppler_page_render_for_printing (PopplerPage *page,
                                      cairo_t *cairo);

Render the page to the given cairo context for printing with POPPLER_PRINT_ALL flags selected. If you want a different set of flags, use `poppler_page_render_for_printing_with_options()`.

The difference between `poppler_page_render()` and this function is that some things get rendered differently between screens and printers:

- PDF annotations get rendered according to their PopplerAnnotFlag value. For example, POPPLER_ANNOT_FLAG_PRINT refers to whether an annotation is printed or not, whereas POPPLER_ANNOT_FLAG_NO_VIEW refers to whether an annotation is invisible when displaying to the screen.
- PDF supports "hairlines" of width 0.0, which often get rendered as having a width of 1 device pixel. When displaying on a screen, Cairo may render such lines wide so that they are hard to see, and Poppler makes use of PDF's Stroke Adjust graphics parameter to make the lines easier to see. However, when printing, Poppler is able to directly use a printer's pixel size instead.
- Some advanced features in PDF may require an image to be rasterized before sending off to a printer. This may produce raster images which exceed Cairo's limits. The "printing" functions will detect this condition and try to down-scale the intermediate surfaces as appropriate.

#### Parameters

page | the page to render from |
cairo | cairo context to render to |

### poppler_page_render_for_printing_with_options ()

    void
    poppler_page_render_for_printing_with_options
                                   (PopplerPage *page,
                                    cairo_t *cairo,
                                    PopplerPrintFlags options);

Render the page to the given cairo context for printing with the specified options

See the documentation for `poppler_page_render_for_printing()` for the differences between rendering to the screen and rendering to a printer.

#### Parameters

page | the page to render from |
cairo | cairo context to render to |
options | print options |

Since: 0.16

### poppler_page_render_selection ()

    void
    poppler_page_render_selection (PopplerPage *page,
                                   cairo_t *cairo,
                                   PopplerRectangle *selection,
                                   PopplerRectangle *old_selection,
                                   PopplerSelectionStyle style,
                                   PopplerColor *glyph_color,
                                   PopplerColor *background_color);

Render the selection specified by `selection` for `page` to the given cairo context. The selection will be rendered, using `glyph_color` for the glyphs and `background_color` for the selection background.

If non-NULL, `old_selection` specifies the selection that is already rendered to `cairo` , in which case this function will (some day) only render the changed part of the selection.

#### Parameters

page | the PopplerPage for which to render selection |
cairo | cairo context to render to |
selection | start and end point of selection as a rectangle |
old_selection | previous selection |
style | a PopplerSelectionStyle |
glyph_color | color to use for drawing glyphs |
background_color | color to use for the selection background |

### poppler_page_render_to_ps ()

    void
    poppler_page_render_to_ps (PopplerPage *page,
                               PopplerPSFile *ps_file);

Render the page on a postscript file

#### Parameters

page | a PopplerPage |
ps_file | the PopplerPSFile to render to |

### poppler_page_selection_region_free ()

    void
    poppler_page_selection_region_free (GList *region);

`poppler_page_selection_region_free` has been deprecated since version 0.16 and should not be used in newly-written code.

Use only to free deprecated regions created by `poppler_page_get_selection_region()`. Regions created by `poppler_page_get_selected_region()` should be freed with `cairo_region_destroy()` instead.

Frees `region`

#### Parameters

region | a GList of PopplerRectangle. | [element-type PopplerRectangle]

### poppler_page_transition_copy ()

    PopplerPageTransition *
    poppler_page_transition_copy (PopplerPageTransition *transition);

Creates a copy of `transition`

#### Parameters

transition | a PopplerPageTransition to copy |

#### Returns

a new allocated copy of `transition`

### poppler_page_transition_free ()

    void
    poppler_page_transition_free (PopplerPageTransition *transition);

Frees the given PopplerPageTransition

#### Parameters

transition | a PopplerPageTransition |

### poppler_page_transition_new ()

    PopplerPageTransition *
    poppler_page_transition_new (void);

Creates a new PopplerPageTransition

#### Returns

a new PopplerPageTransition, use `poppler_page_transition_free()` to free it

### poppler_point_copy ()

    PopplerPoint *
    poppler_point_copy (PopplerPoint *point);

Creates a copy of `point` . The copy must be freed with `poppler_point_free()` after use.

#### Parameters

point | a PopplerPoint to copy |

#### Returns

a new allocated copy of `point`

Since: 0.26

### poppler_point_free ()

    void
    poppler_point_free (PopplerPoint *point);

Frees the memory used by `point`

#### Parameters

point | a PopplerPoint |

Since: 0.26

### poppler_point_new ()

    PopplerPoint *
    poppler_point_new (void);

Creates a new PopplerPoint. It must be freed with `poppler_point_free()` after use.

#### Returns

a new PopplerPoint

Since: 0.26

### poppler_quadrilateral_copy ()

    PopplerQuadrilateral *
    poppler_quadrilateral_copy (PopplerQuadrilateral *quad);

Creates a copy of `quad` . The copy must be freed with `poppler_quadrilateral_free()` after use.

#### Parameters

quad | a PopplerQuadrilateral to copy |

#### Returns

a new allocated copy of `quad`

Since: 0.26

### poppler_quadrilateral_free ()

    void
    poppler_quadrilateral_free (PopplerQuadrilateral *quad);

Frees the memory used by `quad`

#### Parameters

quad | a PopplerQuadrilateral |

Since: 0.26

### poppler_quadrilateral_new ()

    PopplerQuadrilateral *
    poppler_quadrilateral_new (void);

Creates a new PopplerQuadrilateral. It must be freed with `poppler_quadrilateral_free()` after use.

#### Returns

a new PopplerQuadrilateral.

Since: 0.26

### poppler_rectangle_copy ()

    PopplerRectangle *
    poppler_rectangle_copy (PopplerRectangle *rectangle);

Creates a copy of `rectangle` .

Note that you must only use this function on an allocated PopplerRectangle, as returned by `poppler_rectangle_new()`, `poppler_rectangle_copy()`, or the list elements returned from `poppler_page_find_text()` or `poppler_page_find_text_with_options()`.

#### Parameters

rectangle | a PopplerRectangle to copy |

#### Returns

a new allocated copy of `rectangle`

### poppler_rectangle_find_get_match_continued ()

    gboolean
    poppler_rectangle_find_get_match_continued
                                   (const PopplerRectangle *rectangle);

When using `poppler_page_find_text_with_options()` with the `POPPLER_FIND_MULTILINE` flag, a match may span more than one line and thus consist of more than one rectangle. Every rectangle belonging to the same match will return `TRUE` from this function, except for the last rectangle, where this function will return `FALSE`.

Note that you must only call this function on a PopplerRectangle returned in the list from `poppler_page_find_text()` or `poppler_page_find_text_with_options()`.

#### Parameters

rectangle | a PopplerRectangle |

#### Returns

whether there are more rectangles belonging to the same match

Since: 21.05.0

### poppler_rectangle_find_get_ignored_hyphen ()

    gboolean
    poppler_rectangle_find_get_ignored_hyphen
                                   (const PopplerRectangle *rectangle);

When using `poppler_page_find_text_with_options()` with the `POPPLER_FIND_MULTILINE` flag, a match may span more than one line, and may have been formed by ignoring a hyphen at the end of the line. When this happens at the end of the line corresponding to `rectangle` , this function returns `TRUE` (and then `poppler_rectangle_find_get_match_continued()` will also return `TRUE`); otherwise it returns `FALSE`.

Note that you must only call this function on a PopplerRectangle returned in the list from `poppler_page_find_text()` or `poppler_page_find_text_with_options()`.

#### Parameters

rectangle | a PopplerRectangle |

#### Returns

whether a hyphen was ignored at the end of the line corresponding to `rectangle` .

Since: 21.05.0

### poppler_rectangle_free ()

    void
    poppler_rectangle_free (PopplerRectangle *rectangle);

Frees the given PopplerRectangle.

Note that you must only use this function on an allocated PopplerRectangle, as returned by `poppler_rectangle_new()`, `poppler_rectangle_copy()`, or the list elements returned from `poppler_page_find_text()` or `poppler_page_find_text_with_options()`.

#### Parameters

rectangle | a PopplerRectangle |

### poppler_rectangle_new ()

    PopplerRectangle *
    poppler_rectangle_new (void);

Creates a new PopplerRectangle

#### Returns

a new PopplerRectangle, use `poppler_rectangle_free()` to free it

### poppler_text_attributes_copy ()

    PopplerTextAttributes *
    poppler_text_attributes_copy (PopplerTextAttributes *text_attrs);

Creates a copy of `text_attrs`

#### Parameters

text_attrs | a PopplerTextAttributes to copy |

#### Returns

a new allocated copy of `text_attrs`

Since: 0.18

### poppler_text_attributes_free ()

    void
    poppler_text_attributes_free (PopplerTextAttributes *text_attrs);

Frees the given PopplerTextAttributes

#### Parameters

text_attrs | a PopplerTextAttributes |

Since: 0.18

### poppler_text_attributes_new ()

    PopplerTextAttributes *
    poppler_text_attributes_new (void);

Creates a new PopplerTextAttributes

#### Returns

a new PopplerTextAttributes, use `poppler_text_attributes_free()` to free it

Since: 0.18

## Types and Values

### PopplerAnnotMapping

    typedef struct {
        PopplerRectangle area;
        PopplerAnnot *annot;
    } PopplerAnnotMapping;

A PopplerAnnotMapping structure represents the location of `annot` on the page

#### Members

PopplerRectangle `area`; | a PopplerRectangle representing an area of the page |
PopplerAnnot *`annot`; | a PopplerAnnot |

### enum PopplerFindFlags

Flags using while searching text in a page

#### Members

POPPLER_FIND_DEFAULT | use default search settings |
POPPLER_FIND_CASE_SENSITIVE | do case sensitive search |
POPPLER_FIND_BACKWARDS | search backwards |
POPPLER_FIND_WHOLE_WORDS_ONLY | search only whole words |
POPPLER_FIND_IGNORE_DIACRITICS | do diacritics insensitive search, i.e. ignore accents, umlauts, diaeresis,etc. while matching. This option will be ignored if the search term is not pure ascii. Since 0.73. |
POPPLER_FIND_MULTILINE | allows to match on text spanning from end of a line to the next line. (Currently it won't match on text spanning more than two lines.) Automatically ignores hyphen at end of line, and allows whitespace in search term to match on newline char. Since: 21.05.0. |

Since: 0.22

### PopplerFormFieldMapping

    typedef struct {
        PopplerRectangle area;
        PopplerFormField *field;
    } PopplerFormFieldMapping;

A PopplerFormFieldMapping structure represents the location of `field` on the page

#### Members

PopplerRectangle `area`; | a PopplerRectangle representing an area of the page |
PopplerFormField *`field`; | a PopplerFormField |

### PopplerImageMapping

    typedef struct {
        PopplerRectangle area;
        gint image_id;
    } PopplerImageMapping;

A PopplerImageMapping structure represents the location of an image on the page

#### Members

PopplerRectangle `area`; | a PopplerRectangle representing an area of the page |
gint `image_id`; | an image identifier |

### PopplerLinkMapping

    typedef struct {
        PopplerRectangle area;
        PopplerAction *action;
    } PopplerLinkMapping;

A PopplerLinkMapping structure represents the location of `action` on the page

#### Members

PopplerRectangle `area`; | a PopplerRectangle representing an area of the page |
PopplerAction *`action`; | a PopplerAction |

### PopplerPage

    typedef struct _PopplerPage PopplerPage;

### PopplerPageTransition

    typedef struct {
        PopplerPageTransitionType type;
        PopplerPageTransitionAlignment alignment;
        PopplerPageTransitionDirection direction;
        gint duration;
        gint angle;
        gdouble scale;
        gboolean rectangular;
        gdouble duration_real;
    } PopplerPageTransition;

A PopplerPageTransition structures describes a visual transition to use when moving between pages during a presentation

#### Members

PopplerPageTransitionType `type`; | the type of transtition |
PopplerPageTransitionAlignment `alignment`; | the dimension in which the transition effect shall occur. Only for POPPLER_PAGE_TRANSITION_SPLIT and POPPLER_PAGE_TRANSITION_BLINDS transition types |
PopplerPageTransitionDirection `direction`; | the direction of motion for the transition effect. Only for POPPLER_PAGE_TRANSITION_SPLIT, POPPLER_PAGE_TRANSITION_BOX and POPPLER_PAGE_TRANSITION_FLY transition types |
gint `duration`; | the duration of the transition effect |
gint `angle`; | the direction in which the specified transition effect shall moves, expressed in degrees counterclockwise starting from a left-to-right direction. Only for POPPLER_PAGE_TRANSITION_WIPE, POPPLER_PAGE_TRANSITION_GLITTER, POPPLER_PAGE_TRANSITION_FLY, POPPLER_PAGE_TRANSITION_COVER, POPPLER_PAGE_TRANSITION_UNCOVER and POPPLER_PAGE_TRANSITION_PUSH transition types |
gdouble `scale`; | the starting or ending scale at which the changes shall be drawn. Only for POPPLER_PAGE_TRANSITION_FLY transition type |
gboolean `rectangular`; | whether the area that will be flown is rectangular and opaque. Only for POPPLER_PAGE_TRANSITION_FLY transition type |
gdouble `duration_real`; |  |

### enum PopplerPageTransitionAlignment

Page transition alignment types for POPPLER_PAGE_TRANSITION_SPLIT and POPPLER_PAGE_TRANSITION_BLINDS transition types

#### Members

POPPLER_PAGE_TRANSITION_HORIZONTAL | horizontal dimension |
POPPLER_PAGE_TRANSITION_VERTICAL | vertical dimension |

### enum PopplerPageTransitionDirection

Page transition direction types for POPPLER_PAGE_TRANSITION_SPLIT, POPPLER_PAGE_TRANSITION_BOX and POPPLER_PAGE_TRANSITION_FLY transition types

#### Members

POPPLER_PAGE_TRANSITION_INWARD | inward from the edges of the page |
POPPLER_PAGE_TRANSITION_OUTWARD | outward from the center of the page |

### enum PopplerPageTransitionType

Page transition types

#### Members

POPPLER_PAGE_TRANSITION_REPLACE | the new page replace the old one |
POPPLER_PAGE_TRANSITION_SPLIT | two lines sweep across the screen, revealing the new page |
POPPLER_PAGE_TRANSITION_BLINDS | multiple lines, evenly spaced across the screen, synchronously sweep in the same direction to reveal the new page |
POPPLER_PAGE_TRANSITION_BOX | a rectangular box sweeps inward from the edges of the page or outward from the center revealing the new page |
POPPLER_PAGE_TRANSITION_WIPE | a single line sweeps across the screen from one edge to the other revealing the new page |
POPPLER_PAGE_TRANSITION_DISSOLVE | the old page dissolves gradually to reveal the new one |
POPPLER_PAGE_TRANSITION_GLITTER | similar to POPPLER_PAGE_TRANSITION_DISSOLVE, except that the effect sweeps across the page in a wide band moving from one side of the screen to the other |
POPPLER_PAGE_TRANSITION_FLY | changes are flown out or in to or from a location that is offscreen |
POPPLER_PAGE_TRANSITION_PUSH | the old page slides off the screen while the new page slides in |
POPPLER_PAGE_TRANSITION_COVER | the new page slides on to the screen covering the old page |
POPPLER_PAGE_TRANSITION_UNCOVER | the old page slides off the screen uncovering the new page |
POPPLER_PAGE_TRANSITION_FADE | the new page gradually becomes visible through the old one |

### PopplerPoint

    typedef struct {
        gdouble x;
        gdouble y;
    } PopplerPoint;

A PopplerPoint is used to describe a location point on a page

#### Members

gdouble `x`; | x coordinate |
gdouble `y`; | y coordinate |

### enum PopplerPrintFlags

Printing flags

#### Members

POPPLER_PRINT_DOCUMENT | print main document contents |
POPPLER_PRINT_MARKUP_ANNOTS | print document and markup annotations |
POPPLER_PRINT_STAMP_ANNOTS_ONLY | print document and only stamp annotations |
POPPLER_PRINT_ALL | print main document contents and all markup annotations |

Since: 0.16

### PopplerQuadrilateral

    typedef struct {
        PopplerPoint p1;
        PopplerPoint p2;
        PopplerPoint p3;
        PopplerPoint p4;
    } PopplerQuadrilateral;

A PopplerQuadrilateral is used to describe rectangle-like polygon with arbitrary inclination on a page.

#### Members

PopplerPoint `p1`; | a PopplerPoint with the first vertex coordinates |
PopplerPoint `p2`; | a PopplerPoint with the second vertex coordinates |
PopplerPoint `p3`; | a PopplerPoint with the third vertex coordinates |
PopplerPoint `p4`; | a PopplerPoint with the fourth vertex coordinates |

Since: 0.26

### PopplerRectangle

    typedef struct {
        gdouble x1;
        gdouble y1;
        gdouble x2;
        gdouble y2;
    } PopplerRectangle;

A PopplerRectangle is used to describe locations on a page and bounding boxes

#### Members

gdouble `x1`; | x coordinate of lower left corner |
gdouble `y1`; | y coordinate of lower left corner |
gdouble `x2`; | x coordinate of upper right corner |
gdouble `y2`; | y coordinate of upper right corner |

### enum PopplerSelectionStyle

Selection styles

#### Members

POPPLER_SELECTION_GLYPH | glyph is the minimum unit for selection |
POPPLER_SELECTION_WORD | word is the minimum unit for selection |
POPPLER_SELECTION_LINE | line is the minimum unit for selection |

### PopplerTextAttributes

    typedef struct {
        gchar *font_name;
        gdouble font_size;
        gboolean is_underlined;
        PopplerColor color;

        gint start_index;
        gint end_index;
    } PopplerTextAttributes;

A PopplerTextAttributes is used to describe text attributes of a range of text

#### Members

gchar *`font_name`; | font name |
gdouble `font_size`; | font size |
gboolean `is_underlined`; | if text is underlined |
PopplerColor `color`; | a PopplerColor, the foreground color |
gint `start_index`; | start position this text attributes apply |
gint `end_index`; | end position this text attributes apply |

Since: 0.18

## Property Details

### The `“label”` property

      “label”                    char *

The label of the page or `NULL`. See also `poppler_page_get_label()`

Owner: PopplerPage

Flags: Read

Default value: NULL