From 35512dd1ae66e5dbbeb490d3846dafcf150f1f28 Mon Sep 17 00:00:00 2001 From: Wouter Bolsterlee Date: Mon, 04 Dec 2006 11:53:25 +0000 Subject: Adds a paper size field to the properties dialog. Fixes bug #307315. Patch 2006-12-04 Wouter Bolsterlee * 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). --- (limited to 'pdf') 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; -- cgit v0.9.1