+ surface = ev_document_render (document, rc);
+ pixbuf = ev_document_misc_pixbuf_from_surface (surface);
+ cairo_surface_destroy (surface);
+
+ return pixbuf;
+}
+
+GdkPixbuf *
+ev_document_get_thumbnail (EvDocument *document,
+ EvRenderContext *rc)
+{
+ EvDocumentClass *klass = EV_DOCUMENT_GET_CLASS (document);
+
+ if (klass->get_thumbnail)
+ return klass->get_thumbnail (document, rc);
+
+ return _ev_document_get_thumbnail (document, rc);
+}
+
+const gchar *
+ev_document_get_uri (EvDocument *document)
+{
+ g_return_val_if_fail (EV_IS_DOCUMENT (document), NULL);
+
+ return document->priv->uri;
+}
+
+const gchar *
+ev_document_get_title (EvDocument *document)
+{
+ g_return_val_if_fail (EV_IS_DOCUMENT (document), NULL);
+
+ return (document->priv->info->fields_mask & EV_DOCUMENT_INFO_TITLE) ?
+ document->priv->info->title : NULL;
+}
+
+gboolean
+ev_document_is_page_size_uniform (EvDocument *document)
+{
+ g_return_val_if_fail (EV_IS_DOCUMENT (document), TRUE);
+
+ return document->priv->uniform;
+}
+
+void
+ev_document_get_max_page_size (EvDocument *document,
+ gdouble *width,
+ gdouble *height)
+{
+ g_return_if_fail (EV_IS_DOCUMENT (document));
+
+ if (width)
+ *width = document->priv->max_width;
+ if (height)
+ *height = document->priv->max_height;
+}
+
+void
+ev_document_get_min_page_size (EvDocument *document,
+ gdouble *width,
+ gdouble *height)
+{
+ g_return_if_fail (EV_IS_DOCUMENT (document));
+
+ if (width)
+ *width = document->priv->min_width;
+ if (height)
+ *height = document->priv->min_height;
+}
+
+gboolean
+ev_document_check_dimensions (EvDocument *document)
+{
+ g_return_val_if_fail (EV_IS_DOCUMENT (document), FALSE);
+
+ return (document->priv->max_width > 0 && document->priv->max_height > 0);
+}
+
+gint
+ev_document_get_max_label_len (EvDocument *document)
+{
+ g_return_val_if_fail (EV_IS_DOCUMENT (document), -1);
+
+ return document->priv->max_label;
+}
+
+gboolean
+ev_document_has_text_page_labels (EvDocument *document)
+{
+ g_return_val_if_fail (EV_IS_DOCUMENT (document), FALSE);
+
+ return document->priv->page_labels != NULL;
+}
+
+gboolean
+ev_document_find_page_by_label (EvDocument *document,
+ const gchar *page_label,
+ gint *page_index)
+{
+ gint i, page;
+ glong value;
+ gchar *endptr = NULL;
+ EvDocumentPrivate *priv = document->priv;
+
+ g_return_val_if_fail (EV_IS_DOCUMENT (document), FALSE);
+ g_return_val_if_fail (page_label != NULL, FALSE);
+ g_return_val_if_fail (page_index != NULL, FALSE);
+
+ /* First, look for a literal label match */
+ for (i = 0; priv->page_labels && i < priv->n_pages; i ++) {
+ if (priv->page_labels[i] != NULL &&
+ ! strcmp (page_label, priv->page_labels[i])) {
+ *page_index = i;
+ return TRUE;
+ }
+ }
+
+ /* Second, look for a match with case insensitively */
+ for (i = 0; priv->page_labels && i < priv->n_pages; i++) {
+ if (priv->page_labels[i] != NULL &&
+ ! strcasecmp (page_label, priv->page_labels[i])) {
+ *page_index = i;
+ return TRUE;
+ }
+ }
+
+ /* Next, parse the label, and see if the number fits */
+ value = strtol (page_label, &endptr, 10);
+ if (endptr[0] == '\0') {
+ /* Page number is an integer */
+ page = MIN (G_MAXINT, value);
+
+ /* convert from a page label to a page offset */
+ page --;
+ if (page >= 0 && page < priv->n_pages) {
+ *page_index = page;
+ return TRUE;
+ }
+ }
+
+ return FALSE;