Hello,
i updated my poppler pdfviewer to GTK+3.0.
there is a problem now. this code returns a GdkPixbuf with the rendered PopplerPage page
Code:
GdkPixbuf * viewPage(PopplerPage *page)
{
gint stdwidth = 1280;
gint stdheight = 1024;
cairo_surface_t *s;
cairo_t *cr;
s = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, stdwidth, stdheight);
cr = cairo_create(s);
poppler_page_render(page, cr);
bild = gdk_pixbuf_get_from_surface(s, 0, 0, stdwidth, stdheight);
cairo_surface_destroy(s);
cairo_destroy(cr);
return bild;
}
The Pixbuf has a size of 1280x1024 but the rendered page is only about 360x270. How can i scale the PDF Page to the same size as the pixbuf (stdwidth x stdheight)?
greetz