]> www.fi.muni.cz Git - evince.git/commitdiff
Patch from Crispin Flowerday <gnome@flowerday.cx> to avoid rendering the
authorJonathan Blandford <jrb@redhat.com>
Mon, 21 Feb 2005 23:01:12 +0000 (23:01 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Mon, 21 Feb 2005 23:01:12 +0000 (23:01 +0000)
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.

ChangeLog
pdf/xpdf/pdf-document.cc

index 00eb23e8046d36ce123c81888bf18a78ce169030..748c61b4c02f6158d9178b68f1daaf502900b562 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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):
index 2a4e1aabbecca5a86b8140f8afd7b5ef07ca217d..edb812224dfe4471314ba759c956ca0a0a52f845 100644 (file)
@@ -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);
        }
 }