diff options
author | Jonathan Blandford <jrb@redhat.com> | 2005-02-21 23:01:12 (GMT) |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 2005-02-21 23:01:12 (GMT) |
commit | 6887c2c43edcf389641f03f027e32baf7a373d1d (patch) | |
tree | fdd80240a0d4898c7f40ad092fa8db974230ea69 | |
parent | 63d3055cfb524a3165130b0f2318d8f5c66a1161 (diff) |
Patch from Crispin Flowerday <gnome@flowerday.cx> to avoid rendering the
Mon Feb 21 17:52:08 2005 Jonathan Blandford <jrb@redhat.com>
* pdf/xpdf/pdf-document.cc (pdf_document_get_page_size): Patch
from Crispin Flowerday <gnome@flowerday.cx> to avoid rendering the
page when we get the page size.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | pdf/xpdf/pdf-document.cc | 14 |
2 files changed, 10 insertions, 10 deletions
@@ -1,3 +1,9 @@ +Mon Feb 21 17:52:08 2005 Jonathan Blandford <jrb@redhat.com> + + * pdf/xpdf/pdf-document.cc (pdf_document_get_page_size): Patch + from Crispin Flowerday <gnome@flowerday.cx> to avoid rendering the + page when we get the page size. + 2005-02-21 Marco Pesenti Gritti <marco@gnome.org> * ps/ps-document.c: (ps_document_set_page), (ps_document_get_page): diff --git a/pdf/xpdf/pdf-document.cc b/pdf/xpdf/pdf-document.cc index 2a4e1aa..edb8122 100644 --- a/pdf/xpdf/pdf-document.cc +++ b/pdf/xpdf/pdf-document.cc @@ -363,19 +363,13 @@ pdf_document_get_page_size (EvDocument *document, if (height) *height = 1; - - if (page == -1 && document_validate_page (pdf_document)) { - if (width) - *width = pdf_document->out->getBitmapWidth(); - if (height) - *height = pdf_document->out->getBitmapHeight(); - return; - } + if (page == -1) + page = pdf_document->page; the_page = pdf_document->doc->getCatalog ()->getPage (page); if (the_page) { - *width = (int) the_page->getWidth (); - *height = (int) the_page->getHeight (); + *width = (int) ((the_page->getWidth () * pdf_document->scale) + 0.5); + *height = (int) ((the_page->getHeight () * pdf_document->scale) + 0.5); } } |