Skip Menu |

This queue is for tickets about the Poppler CPAN distribution.

Report information
The Basics
Id: 118973
Status: open
Priority: 0/
Queue: Poppler

People
Owner: Nobody in particular
Requestors: kibi [...] mraw.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: advertised render_to_cairo isn't available
Date: Sat, 26 Nov 2016 07:49:00 +0100
To: bug-Poppler [...] rt.cpan.org
From: Cyril Brulebois <kibi [...] mraw.org>
Hi, I was interested in getting PDF rendering done through this module, but that doesn't seem to be possible as of version 1.0101; I'm getting this when trying to run the example advertised in the manpage: | Can't locate object method "render_to_cairo" via package "Poppler::Page" at ./poppler-example.pl line 28. Versions: --------- Poppler 1.0101 libpoppler-dev 0.26.5-2+deb8u1 libpoppler-glib-dev 0.26.5-2+deb8u1 perl 5.20.2-3+deb8u6 Given a git grep render_to_cairo only returns hits in documentation, I suppose this got lost during the switch to GObject introspection. AFAIUI, the mapping is done through share/Poppler-0.18.typelib which is compiled from poppler; the typelib file seems to contain render_to_ps only, which is mapped to poppler_page_render_to_ps? It seems there used to be a (poppler_page_)render_to_pixbuf but that's gone: | commit a24e326425e198eeb70c4d9205bb7a0a3a9db297 | Author: Carlos Garcia Campos <carlosgc@gnome.org> | Date: Sat May 19 12:09:45 2012 +0200 | | gtk-tests: Port to GTK+ 3.0 | | commit 080247f6a47bc929b25f6e000f4474801af74b1f | Author: Hib Eris <hib@hiberis.nl> | Date: Thu Feb 2 15:45:37 2012 +0100 | | gtk-doc: remove references to removed pixbuf functions | | Bug #45549. | | commit 149b7fec472beda9d1538e0f26607c9498d504c2 | Author: Carlos Garcia Campos <carlosgc@gnome.org> | Date: Sun Feb 13 11:51:57 2011 +0100 | | glib: Remove deprecated GDK API | | It removes the GDK dependency so that poppler-glib now only depends on | glib and cairo. It doesn't seem like there are too many poppler_page_render_* functions exported nowadays, so maybe Poppler.pm can't really be fixed to get this feature back? Cheers, -- Cyril Brulebois
Show quoted text
> I was interested in getting PDF rendering done through this module, > but > that doesn't seem to be possible as of version 1.0101; I'm getting > this > when trying to run the example advertised in the manpage: > | Can't locate object method "render_to_cairo" via package > "Poppler::Page" at ./poppler-example.pl line 28. >
Sorry about that, the documentation is indeed wrong. The method you are looking for is: $page->render($cr) where $cr is a Cairo::Context you've created already. I'll fix the documentation for the next minor release. Jeremy