]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/pdf-document.cc
Updated Greek Translation by Stylianos Papanastasiou <stelios@dcs.gla.ac.uk>.
[evince.git] / pdf / pdf-document.cc
index 2ed1f1719142bc1dd99f31de6d7048510230b7ce..fc2568ba75b77f8e61ca05c020573c7748b821a2 100644 (file)
@@ -1252,7 +1252,7 @@ pdf_document_thumbnails_get_page_pixbuf (PdfDocument *pdf_document,
        output = new SplashOutputDev (splashModeRGB8, gFalse, color);
        output->startDoc (pdf_document->doc->getXRef());
        pdf_document->doc->displayPage (output,
-                                       page_num + 1,
+                                       page_num,
                                        72*scale_factor,
                                        72*scale_factor,
                                        0, gTrue, gFalse);
@@ -1262,13 +1262,14 @@ pdf_document_thumbnails_get_page_pixbuf (PdfDocument *pdf_document,
 
        if (border) {
                pixbuf = ev_document_misc_get_thumbnail_frame (width, height, NULL);
+               bitmap_to_pixbuf (output->getBitmap(), pixbuf, 1, 1);
        } else {
                pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
-                                        width + 4, height + 4);
+                                        width, height);
                gdk_pixbuf_fill (pixbuf, 0xffffffff);
+               bitmap_to_pixbuf (output->getBitmap(), pixbuf, 0, 0);
        }
 
-       bitmap_to_pixbuf (output->getBitmap(), pixbuf, 1, 1);
        delete output;
 
        return pixbuf;
@@ -1286,7 +1287,7 @@ pdf_document_thumbnails_get_dimensions (EvDocumentThumbnails *document_thumbnail
        Object the_thumb;
        Thumb *thumb = NULL;
 
-       the_page = pdf_document->doc->getCatalog ()->getPage (page + 1);
+       the_page = pdf_document->doc->getCatalog ()->getPage (page);
        the_page->getThumb (&the_thumb);
 
        if (!(the_thumb.isNull () || the_thumb.isNone())) {
@@ -1325,8 +1326,7 @@ pdf_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document_thumbnails
        Thumb *thumb = NULL;
        gboolean have_ethumbs = FALSE;
 
-       /* getPage seems to want page + 1 for some reason; */
-       the_page = pdf_document->doc->getCatalog ()->getPage (page + 1);
+       the_page = pdf_document->doc->getCatalog ()->getPage (page);
        the_page->getThumb(&the_thumb);
 
        if (!(the_thumb.isNull () || the_thumb.isNone())) {