Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdf
diff options
context:
space:
mode:
Diffstat (limited to 'pdf')
-rw-r--r--pdf/ev-poppler.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/pdf/ev-poppler.cc b/pdf/ev-poppler.cc
index a90c524..148c6c5 100644
--- a/pdf/ev-poppler.cc
+++ b/pdf/ev-poppler.cc
@@ -503,8 +503,8 @@ pdf_document_get_info (EvDocument *document)
EV_DOCUMENT_INFO_MOD_DATE |
EV_DOCUMENT_INFO_LINEARIZED |
EV_DOCUMENT_INFO_N_PAGES |
- EV_DOCUMENT_INFO_SECURITY;
-
+ EV_DOCUMENT_INFO_SECURITY |
+ EV_DOCUMENT_INFO_PAPER_SIZE;
g_object_get (PDF_DOCUMENT (document)->document,
"title", &(info->title),
@@ -523,6 +523,14 @@ pdf_document_get_info (EvDocument *document)
"linearized", &(info->linearized),
NULL);
+ pdf_document_get_page_size(document, 0,
+ &(info->paper_width),
+ &(info->paper_height));
+
+ // Convert to mm.
+ info->paper_width = info->paper_width / 72.0f * 25.4f;
+ info->paper_height = info->paper_height / 72.0f * 25.4f;
+
switch (layout) {
case POPPLER_PAGE_LAYOUT_SINGLE_PAGE:
info->layout = EV_DOCUMENT_LAYOUT_SINGLE_PAGE;