summaryrefslogtreecommitdiff
path: root/glib/poppler-action.cc
diff options
context:
space:
mode:
Diffstat (limited to 'glib/poppler-action.cc')
-rw-r--r--glib/poppler-action.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/glib/poppler-action.cc b/glib/poppler-action.cc
index e9f29590..98cf0d46 100644
--- a/glib/poppler-action.cc
+++ b/glib/poppler-action.cc
@@ -249,7 +249,20 @@ dest_new_goto (PopplerDocument *document,
dest->change_left = link_dest->getChangeLeft ();
dest->change_top = link_dest->getChangeTop ();
dest->change_zoom = link_dest->getChangeZoom ();
-
+
+ if (dest->page_num > 0) {
+ PopplerPage *page;
+
+ page = poppler_document_get_page (document, dest->page_num - 1);
+
+ dest->left -= page->page->getCropBox ()->x1;
+ dest->bottom -= page->page->getCropBox ()->x1;
+ dest->right -= page->page->getCropBox ()->y1;
+ dest->top -= page->page->getCropBox ()->y1;
+
+ g_object_unref (page);
+ }
+
return dest;
}