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

## Synopsis

    void                poppler_page_render                 (PopplerPage *page,
                                                             cairo_t *cairo);
    void                poppler_page_render_to_pixbuf       (PopplerPage *page,
                                                             int src_x,
                                                             int src_y,
                                                             int src_width,
                                                             int src_height,
                                                             double scale,
                                                             int rotation,
                                                             GdkPixbuf *pixbuf);
    void                poppler_page_get_size               (PopplerPage *page,
                                                             double *width,
                                                             double *height);
    int                 poppler_page_get_index              (PopplerPage *page);
    cairo_surface_t*    poppler_page_get_thumbnail          (PopplerPage *page);
    gboolean            poppler_page_get_thumbnail_size     (PopplerPage *page,
                                                             int *width,
                                                             int *height);
    void                poppler_page_render_to_ps           (PopplerPage *page,
                                                             PopplerPSFile *ps_file);
    GList*              poppler_page_find_text              (PopplerPage *page,
                                                             const char *text);
    char*               poppler_page_get_text               (PopplerPage *page,
                                                             PopplerSelectionStyle style,
                                                             PopplerRectangle *rect);
    double              poppler_page_get_duration           (PopplerPage *page);
    PopplerPageTransition* poppler_page_get_transition      (PopplerPage *page);
    GList*              poppler_page_get_link_mapping       (PopplerPage *page);
    void                poppler_page_free_link_mapping      (GList *list);
    GList*              poppler_page_get_image_mapping      (PopplerPage *page);
    void                poppler_page_free_image_mapping     (GList *list);
    GList*              poppler_page_get_form_field_mapping (PopplerPage *page);
    void                poppler_page_free_form_field_mapping
                                                            (GList *list);
    GList*              poppler_page_get_selection_region   (PopplerPage *page,
                                                             gdouble scale,
                                                             PopplerSelectionStyle style,
                                                             PopplerRectangle *selection);
    void                poppler_page_render_selection       (PopplerPage *page,
                                                             cairo_t *cairo,
                                                             PopplerRectangle *selection,
                                                             PopplerRectangle *old_selection,
                                                             PopplerSelectionStyle style,
                                                             PopplerColor *glyph_color,
                                                             PopplerColor *background_color);
    void                poppler_page_render_selection_to_pixbuf
                                                            (PopplerPage *page,
                                                             gdouble scale,
                                                             int rotation,
                                                             GdkPixbuf *pixbuf,
                                                             PopplerRectangle *selection,
                                                             PopplerRectangle *old_selection,
                                                             PopplerSelectionStyle style,
                                                             GdkColor *glyph_color,
                                                             GdkColor *background_color);
    #define             POPPLER_TYPE_RECTANGLE
                        PopplerRectangle;
    GType               poppler_rectangle_get_type          (void);
    PopplerRectangle*   poppler_rectangle_new               (void);
    PopplerRectangle*   poppler_rectangle_copy              (PopplerRectangle *rectangle);
    void                poppler_rectangle_free              (PopplerRectangle *rectangle);
    #define             POPPLER_TYPE_PAGE_TRANSITION
                        PopplerPageTransition;
    GType               poppler_page_transition_get_type    (void);
    PopplerPageTransition* poppler_page_transition_new      (void);
    PopplerPageTransition* poppler_page_transition_copy     (PopplerPageTransition *transition);
    void                poppler_page_transition_free        (PopplerPageTransition *transition);
    #define             POPPLER_TYPE_LINK_MAPPING
                        PopplerLinkMapping;
    GType               poppler_link_mapping_get_type       (void);
    PopplerLinkMapping* poppler_link_mapping_new            (void);
    PopplerLinkMapping* poppler_link_mapping_copy           (PopplerLinkMapping *mapping);
    void                poppler_link_mapping_free           (PopplerLinkMapping *mapping);
    #define             POPPLER_TYPE_IMAGE_MAPPING
                        PopplerImageMapping;
    GType               poppler_image_mapping_get_type      (void);
    PopplerImageMapping* poppler_image_mapping_new          (void);
    PopplerImageMapping* poppler_image_mapping_copy         (PopplerImageMapping *mapping);
    void                poppler_image_mapping_free          (PopplerImageMapping *mapping);
    #define             POPPLER_TYPE_FORM_FIELD_MAPPING
                        PopplerFormFieldMapping;
    GType               poppler_form_field_mapping_get_type (void);
    PopplerFormFieldMapping* poppler_form_field_mapping_new (void);
    PopplerFormFieldMapping* poppler_form_field_mapping_copy
                                                            (PopplerFormFieldMapping *mapping);
    void                poppler_form_field_mapping_free     (PopplerFormFieldMapping *mapping);

## Description

## Details

### 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

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

### poppler_page_render_to_pixbuf ()

    void                poppler_page_render_to_pixbuf       (PopplerPage *page,
                                                             int src_x,
                                                             int src_y,
                                                             int src_width,
                                                             int src_height,
                                                             double scale,
                                                             int rotation,
                                                             GdkPixbuf *pixbuf);

First scale the document to match the specified pixels per point, then render the rectangle given by the upper left corner at (src_x, src_y) and src_width and src_height. 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_to_pixbuf_for_printing()` instead

`page` : | the page to render from
`src_x` : | x coordinate of upper left corner
`src_y` : | y coordinate of upper left corner
`src_width` : | width of rectangle to render
`src_height` : | height of rectangle to render
`scale` : | scale specified as pixels per point
`rotation` : | rotate the document by the specified degree
`pixbuf` : | pixbuf to render into

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

`page` : | A PopplerPage
`width` : | return location for the width of `page`
`height` : | return location for the height of `page`

### poppler_page_get_index ()

    int                 poppler_page_get_index              (PopplerPage *page);

Returns the index of `page`

`page` : | a PopplerPage
Returns : | index value of `page`

### 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`.

`page` : | the PopperPage 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.

`page` : | A PopplerPage
`width` : | return location for width
`height` : | return location for height
Returns : | `TRUE`, if `page` has a thumbnail associated with it.

### poppler_page_render_to_ps ()

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

Render the page on a postscript file

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

### poppler_page_find_text ()

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

A GList of rectangles for each occurance of the text on the page. The coordinates are in PDF points.

`page` : | a PopplerPage
`text` : | the text to search for (UTF-8 encoded)
Returns : | a GList of PopplerRectangle,

### poppler_page_get_text ()

    char*               poppler_page_get_text               (PopplerPage *page,
                                                             PopplerSelectionStyle style,
                                                             PopplerRectangle *rect);

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

`page` : | a PopplerPage
`style` : | a PopplerSelectionStyle
`rect` : |
Returns : | a pointer to the contents of the `selection` as a string

### poppler_page_get_duration ()

    double              poppler_page_get_duration           (PopplerPage *page);

Returns the duration of `page`

`page` : | a PopplerPage
Returns : | duration in seconds of `page` or -1.

### poppler_page_get_transition ()

    PopplerPageTransition* poppler_page_get_transition      (PopplerPage *page);

Returns the transition effect of `page`

`page` : | a PopplerPage
Returns : | a PopplerPageTransition or NULL.

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

`page` : | A PopplerPage
Returns : | A GList of PopplerLinkMapping

### 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()`.

`list` : | A list of PopplerLinkMappings

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

`page` : | A PopplerPage
Returns : | A GList of PopplerImageMapping

### 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()`.

`list` : | A list of PopplerImageMappings

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

`page` : | A PopplerPage
Returns : | A GList of PopplerFormFieldMapping

### 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()`.

`list` : | A list of PopplerFormFieldMappings

### poppler_page_get_selection_region ()

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

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

`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

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

`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_selection_to_pixbuf ()

    void                poppler_page_render_selection_to_pixbuf
                                                            (PopplerPage *page,
                                                             gdouble scale,
                                                             int rotation,
                                                             GdkPixbuf *pixbuf,
                                                             PopplerRectangle *selection,
                                                             PopplerRectangle *old_selection,
                                                             PopplerSelectionStyle style,
                                                             GdkColor *glyph_color,
                                                             GdkColor *background_color);

Render the selection specified by `selection` for `page` into `pixbuf`. The selection will be rendered at `scale`, 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 in `pixbuf`, in which case this function will (some day) only render the changed part of the selection.

`page` : | the PopplerPage for which to render selection
`scale` : | scale specified as pixels per point
`rotation` : | rotate the document by the specified degree
`pixbuf` : | pixbuf 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_TYPE_RECTANGLE

    #define POPPLER_TYPE_RECTANGLE             (poppler_rectangle_get_type ())

### PopplerRectangle

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

### poppler_rectangle_get_type ()

    GType               poppler_rectangle_get_type          (void);

Returns : |

### poppler_rectangle_new ()

    PopplerRectangle*   poppler_rectangle_new               (void);

Returns : |

### poppler_rectangle_copy ()

    PopplerRectangle*   poppler_rectangle_copy              (PopplerRectangle *rectangle);

`rectangle` : |
Returns : |

### poppler_rectangle_free ()

    void                poppler_rectangle_free              (PopplerRectangle *rectangle);

`rectangle` : |

### POPPLER_TYPE_PAGE_TRANSITION

    #define POPPLER_TYPE_PAGE_TRANSITION                (poppler_page_transition_get_type ())

### PopplerPageTransition

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

### poppler_page_transition_get_type ()

    GType               poppler_page_transition_get_type    (void);

Returns : |

### poppler_page_transition_new ()

    PopplerPageTransition* poppler_page_transition_new      (void);

Returns : |

### poppler_page_transition_copy ()

    PopplerPageTransition* poppler_page_transition_copy     (PopplerPageTransition *transition);

`transition` : |
Returns : |

### poppler_page_transition_free ()

    void                poppler_page_transition_free        (PopplerPageTransition *transition);

`transition` : |

### POPPLER_TYPE_LINK_MAPPING

    #define POPPLER_TYPE_LINK_MAPPING             (poppler_link_mapping_get_type ())

### PopplerLinkMapping

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

### poppler_link_mapping_get_type ()

    GType               poppler_link_mapping_get_type       (void);

Returns : |

### poppler_link_mapping_new ()

    PopplerLinkMapping* poppler_link_mapping_new            (void);

Returns : |

### poppler_link_mapping_copy ()

    PopplerLinkMapping* poppler_link_mapping_copy           (PopplerLinkMapping *mapping);

`mapping` : |
Returns : |

### poppler_link_mapping_free ()

    void                poppler_link_mapping_free           (PopplerLinkMapping *mapping);

`mapping` : |

### POPPLER_TYPE_IMAGE_MAPPING

    #define POPPLER_TYPE_IMAGE_MAPPING             (poppler_image_mapping_get_type ())

### PopplerImageMapping

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

### poppler_image_mapping_get_type ()

    GType               poppler_image_mapping_get_type      (void);

Returns : |

### poppler_image_mapping_new ()

    PopplerImageMapping* poppler_image_mapping_new          (void);

Returns : |

### poppler_image_mapping_copy ()

    PopplerImageMapping* poppler_image_mapping_copy         (PopplerImageMapping *mapping);

`mapping` : |
Returns : |

### poppler_image_mapping_free ()

    void                poppler_image_mapping_free          (PopplerImageMapping *mapping);

`mapping` : |

### POPPLER_TYPE_FORM_FIELD_MAPPING

    #define POPPLER_TYPE_FORM_FIELD_MAPPING               (poppler_form_field_mapping_get_type ())

### PopplerFormFieldMapping

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

### poppler_form_field_mapping_get_type ()

    GType               poppler_form_field_mapping_get_type (void);

Returns : |

### poppler_form_field_mapping_new ()

    PopplerFormFieldMapping* poppler_form_field_mapping_new (void);

Returns : |

### poppler_form_field_mapping_copy ()

    PopplerFormFieldMapping* poppler_form_field_mapping_copy
                                                            (PopplerFormFieldMapping *mapping);

`mapping` : |
Returns : |

### poppler_form_field_mapping_free ()

    void                poppler_form_field_mapping_free     (PopplerFormFieldMapping *mapping);

`mapping` : |