Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdf
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2005-02-02 13:22:53 (GMT)
committer Jonathan Blandford <jrb@src.gnome.org>2005-02-02 13:22:53 (GMT)
commitbebd9ceae1ec88ddee03bda8c7572c9cb06f6b77 (patch)
tree473a80dc33f128ab0c24e3322002d2066f0fe293 /pdf
parente6bb7c7e25b848008409db982bbac260fa97f73c (diff)
New file with some random thoughts.
Wed Feb 2 21:13:11 2005 Jonathan Blandford <jrb@redhat.com> * NOTES: New file with some random thoughts. * TODO: Update. * backend/ev-document-misc.c: (ev_document_misc_get_page_border_size): New function to canonicalize shadow drawing sizes. Possibly goofy. * shell/ev-view.c: (ev_view_size_request), (set_document_page), (ev_view_best_fit), (ev_view_fit_width): * pdf/xpdf/pdf-document.cc: * pixbuf/pixbuf-document.c: (pixbuf_document_get_page_size): * ps/ps-document.c: (ps_document_get_page_size): * backend/ev-document-misc.h: * backend/ev-document.c: (ev_document_get_page_size): * backend/ev-document.h: get_page_size now takes a page number parameter. Made all the backends/frontends honor it. * data/evince-ui.xml: Added a multiple-page mode. Uncomment to see. Doesn't work yet. * shell/Makefile.am: * shell/ev-page-view.[ch]: New multi-page view. Really rough. Doesn't do anything yet. * shell/ev-sidebar-thumbnails.c: (ev_sidebar_thumbnails_set_document): [1..n_pages] instead of [0..n_pages-1] * shell/ev-window.c: (update_action_sensitivity), (ev_window_setup_document), (ev_window_set_page_mode), (ev_window_page_mode_cb), (ev_window_init): Clean up the view-swapping code a bit so we can have multiple views on a document. Add the multi-page view, though it can't be turned on yet.
Diffstat (limited to 'pdf')
-rw-r--r--pdf/xpdf/pdf-document.cc26
1 files changed, 18 insertions, 8 deletions
diff --git a/pdf/xpdf/pdf-document.cc b/pdf/xpdf/pdf-document.cc
index b913be8..1855222 100644
--- a/pdf/xpdf/pdf-document.cc
+++ b/pdf/xpdf/pdf-document.cc
@@ -350,21 +350,32 @@ pdf_document_set_page_offset (EvDocument *document,
static void
pdf_document_get_page_size (EvDocument *document,
+ int page,
int *width,
int *height)
{
PdfDocument *pdf_document = PDF_DOCUMENT (document);
+ Page *the_page;
+
+ /* set some default values */
+ if (width)
+ *width = 1;
+ if (height)
+ *height = 1;
- if (document_validate_page (pdf_document)) {
+
+ if (page == -1 && document_validate_page (pdf_document)) {
if (width)
*width = pdf_document->out->getBitmapWidth();
if (height)
*height = pdf_document->out->getBitmapHeight();
- } else {
- if (width)
- *width = 1;
- if (height)
- *height = 1;
+ return;
+ }
+
+ the_page = pdf_document->doc->getCatalog ()->getPage (page);
+ if (the_page) {
+ *width = (int) the_page->getWidth ();
+ *height = (int) the_page->getHeight ();
}
}
@@ -1244,8 +1255,7 @@ pdf_document_thumbnails_get_dimensions (EvDocumentThumbnails *document_thumbnail
Thumb *thumb = NULL;
gdouble page_ratio;
- /* 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())) {