diff options
author | Wouter Bolsterlee <wbolster@cvs.gnome.org> | 2006-12-04 11:53:25 (GMT) |
---|---|---|
committer | Wouter Bolsterlee <wbolster@src.gnome.org> | 2006-12-04 11:53:25 (GMT) |
commit | 35512dd1ae66e5dbbeb490d3846dafcf150f1f28 (patch) | |
tree | 71ac4570190afa6c046b31490b8196cb14d97655 /pdf/ev-poppler.cc | |
parent | 1f4859f8061b8a03e8f75a5cbd26f16c19155670 (diff) |
Adds a paper size field to the properties dialog. Fixes bug #307315. Patch
2006-12-04 Wouter Bolsterlee <wbolster@cvs.gnome.org>
* backend/ev-document-info.h:
* data/evince-properties.glade:
* pdf/ev-poppler.cc:
* properties/ev-properties-view.c: (ev_regular_paper_size),
(ev_properties_view_set_info):
* ps/ps-document.c: (ps_document_get_info):
Adds a paper size field to the properties dialog. Fixes
bug #307315. Patch by Kasper Svendsen (with some i18n
changes done by me).
Diffstat (limited to 'pdf/ev-poppler.cc')
-rw-r--r-- | pdf/ev-poppler.cc | 12 |
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; |