X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=backend%2Fpdf%2Fev-poppler.cc;h=8f21312f864eda61648b0a15746aea3003b353e4;hb=6f03d33d81e62812224ded083ad81f12bd649911;hp=1edbb4893c5f2011423319ed1801b5c48f492fc5;hpb=a6752097e86efdfbebd598b409677b429472815a;p=evince.git diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index 1edbb489..8f21312f 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -1252,8 +1252,8 @@ pdf_document_thumbnails_get_dimensions (EvDocumentThumbnails *document_thumbnail poppler_page_get_size (poppler_page, &page_width, &page_height); - *width = (gint) (page_width * rc->scale); - *height = (gint) (page_height * rc->scale); + *width = (gint) MAX (page_width * rc->scale, 1); + *height = (gint) MAX (page_height * rc->scale, 1); } if (rc->rotation == 90 || rc->rotation == 270) { @@ -1623,13 +1623,23 @@ pdf_selection_render_selection (EvSelection *selection, TRUE, 8, width, height); } - + +#if POPPLER_VERSION <= 5 poppler_page_render_selection (POPPLER_PAGE (rc->data), rc->scale, rc->rotation, *pixbuf, (PopplerRectangle *)points, (PopplerRectangle *)old_points, text, base); +#else /* POPPLER_VERSION == 9 */ + poppler_page_render_selection_to_pixbuf (POPPLER_PAGE (rc->data), + rc->scale, rc->rotation, *pixbuf, + (PopplerRectangle *)points, + (PopplerRectangle *)old_points, + POPPLER_SELECTION_NORMAL, + text, + base); +#endif }