patch to port to new 0.15 API for libpoppler

Bug #661503 reported by Alex L
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Referencer
Fix Released
Undecided
Mads Chr. Olesen

Bug Description

The new poppler 0.15 API changes the semantics of the poppler_page_get_text() and poppler_page_get_selected_text() functions. This patch detects the presence of the poppler_page_get_selected_text() function present in poppler >=0.15 and changes the call accordingly. This patch is backwards compatible with compiling against poppler <= 0.14.

Tags: patch poppler
Revision history for this message
Alex L (alexl-users) wrote :
Revision history for this message
Alex L (alexl-users) wrote :

This has been fixed in Fedora rawhide build:

http://koji.fedoraproject.org/koji/buildinfo?buildID=199328

Revision history for this message
Alex L (alexl-users) wrote :

Actually wrong build, this is the latest rawhide build of referencer:

http://koji.fedoraproject.org/koji/buildinfo?buildID=200694

Changed in referencer:
status: New → In Progress
Changed in referencer:
assignee: nobody → Mads Chr. Olesen (shiyee)
Revision history for this message
Enno Gröper (egroeper) wrote :

I don't think the patch fixes the problem correctly, because "poppler_page_get_text" existed before poppler 0.15.
With the new API it has to be called with other parameters.
I assume, this won't compile, if you try it with an older version of poppler.

In my opinion the correct way to fix this, is checking against poppler version.
See attached patch (extracted from my github fork: https://github.com/egroeper/referencer).

P.S.: Thanks for continuing development!

Revision history for this message
Mads Chr. Olesen (shiyee) wrote :

Hi Enno, thanks for your updated patch, I will try it out.
I suppose we could stop supporting the older versions of poppler as these are more than a few years old?
About the other patches in your git repository, do you think these are ready to be merged as well?

Changed in referencer:
status: In Progress → Fix Committed
Changed in referencer:
milestone: none → 1.2.0
Changed in referencer:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.