Old cairo version in Ubuntu 9.10 does not render PDF properly

Bug #459569 reported by John Webster
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Poppler
Fix Released
Medium
cairo (Ubuntu)
Fix Released
Medium
Ubuntu Desktop Bugs

Bug Description

Binary package hint: evince

The version of Evince ("document viewer") included in Ubuntu 9.10 appears only to render graphical elements in PDF files like that presented in the attachment. All text elements are missing. The same files are rendered perfectly in the version of the package included with Ubuntu 9.04 and in Adobe Reader.

ProblemType: Bug
Architecture: i386
Date: Sat Oct 24 15:19:31 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/evince
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release Candidate i386 (20091020.3)
Package: evince 2.28.1-0ubuntu1
ProcEnviron:
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: evince
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
John Webster (civil-bigpond) wrote :
Revision history for this message
John Webster (civil-bigpond) wrote :

The attached file demonstrates the problem.

Revision history for this message
Dimitrios Symeonidis (azimout) wrote :

Confirming. acroread and xpdf render correctly. The problem seems to be that there are no font names in the embedded fonts; here's the output of pdffonts:
name type emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
[none] Type 3 yes no no 14 0
[none] Type 3 yes no no 15 0
[none] Type 3 yes no no 16 0
[none] Type 3 yes no no 17 0
[none] Type 3 yes no no 18 0
[none] Type 3 yes no no 19 0
[none] Type 3 yes no no 20 0
[none] Type 3 yes no no 21 0
[none] Type 3 yes no no 22 0
[none] Type 3 yes no no 23 0
Importance: medium. I have no 9.04 to test that this is a regression

Changed in evince (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
skillllllz (bmustafa) wrote :

I have this same issue. Is there anything I can do or try to help?

Revision history for this message
Dimitrios Symeonidis (azimout) wrote :

strangely, acroread seems to be able to read those font names; see attached screenshot

Revision history for this message
In , Dsheil (dsheil) wrote :

Created an attachment (id=32239)
Sample PDF where newer poppler versions can not see some text

Manuel Mourão reported in Ubuntu's bug tracker that a PDF he had was not working as some of the text in the PDF was not being displayed. I have attached that PDF to this bug report. He says he can read the PDF with xpdf but not Evince. Evince is dependent on poppler, xpdf is not.

I did a number of tests, and various versions of evince linked against 0.11.1 and earlier poppler libraries worked in being able to see the specified text in this document. Poppler 0.11.2 broke evince's ability to read the text.

I also used the epdfview program to look at the PDF, with it using the pre-0.11.2 and post-0.11.1 poppler libraries. For the former it could see the specified text, for the latter it could not.

It looks like a code change in 0.11.2 broke poppler's ability to see this text, since poppler can see the text in 0.11.1.

By post-0.11.1 poppler being broken in this regard I mean every release from 0.11.2 to 0.12.2. It is also broken in a compile I did of today's git branch ( git://git.freedesktop.org/git/poppler/poppler ).

The original reporter said he could view the missing text in Xpdf, and I can as well. The changes in 0.11.2 removed poppler's ability to see the text.

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

The problem is most likely in the cairo renderer backend than in the glib frontend, but yes i can reproduce the problem.

Carlos?

Revision history for this message
In , Carlos Garcia Campos (carlosgc) wrote :

it works for me with current git master.

Revision history for this message
In , Dsheil (dsheil) wrote :

I did a git bisect and tested commits between 0.11.1 and 0.11.2. The commit that breaks it is ad26e34bede53cb6300bc463cbdcc2b5adf101c2 . Prior to that commit the text is displayed (commit ee6b761a55baef4c3bbe4614b0c3b3d761a3111f and prior display the text).

I am using the Cairo 1.8.8 library on Ubuntu 9.10, as was the original Ubuntu bug reporter. Cairo 1.8.8 appears to be the last stable Cairo library, although I do see there are newer development versions of Cairo.

The ad2...1c2 commit modified lines in the CairoOutputDev.cc file. A git show after my bisect tests gave this information about the commit:

git show

commit ad26e34bede53cb6300bc463cbdcc2b5adf101c2
Author: Carlos Garcia Campos <email address hidden>
Date: Sun Jul 26 18:36:06 2009 +0200
    [cairo] Use rectangle + clip instead of invert + tranform
    This is just for consistency of drawImage methods

Revision history for this message
In , Dsheil (dsheil) wrote :

Actually, close but not quite there. 512b2c654fd80c83b82e7adc828a478a18de17ab is the bad commit, ad26e34bede53cb6300bc463cbdcc2b5adf101c2 is the last good commit.

Revision history for this message
In , Dsheil (dsheil) wrote :

Created an attachment (id=32245)
A reversion of the bad commit for the current code

As I said, 512b2c654fd80c83b82e7adc828a478a18de17ab is the bad commit which removes the functionality. That commit was made on July 26, 2009.

I just grabbed poppler from git with the last commit being df0ccddb7f784b4a8564beda51b3047cb9e3611a (December 18, 2009). The patch I put here rolls back the bad 512b...ab commit against this latest code (df0c...611a). After installing this patch on df0c...611a, I can now see the deleted text.

I am not completely familiar with cairo and poppler and do not know all the reasons for the 512b...17ab commit. What it appears like to me is poppler had some old hacky stuff in it as a workaround prior to Cairo coming out with the ability to do "cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);". The old hacks were taken out, the new Cairo calls were put in. And they were hacks on the poppler end - there's mallocing, lack of good error handling etc. But the old code still works, and the 512b...17ab code ultimately does not.

My patch puts the old mallocing, bad error handling but working code back in as a child of the last commit (df0c...611a). The goal I suppose would be to fix it so it is working, and then work to get the 512b...17ab code that implements cairo_pattern_set_extend() with CAIRO_EXTEND_PAD properly.

As I said, I don't fully understand poppler, cairo, gradient patterns etc. If I have time I will look at this some more.

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

As said fails here on git master, my cairo version is cairo-1.8.8-3.fc12.i686

Revision history for this message
Dennis Sheil (dennis-sheil) wrote : Re: The current version (2.28.1) does not render some documents that worked perfectly under earlier versions.

This is the same bug as #497175. I know it is because I tried to read the attached file here with the current 9.10 evince version (2.28.1) linked against four poppler libraries - the latest development poppler library, the current 9.10 poppler library (0.12.0), the poppler library after the bad commit to poppler on July 26, 2009 that breaks this functionality, and the commit just prior to that bad poppler commit.

I am moving this to the poppler section as this is not a problem with evince per se, but a problem with poppler which evince is dependent on. I am also linking to the bug report of this on poppler's bug tracking page at freedesktop.org.

I've posted a patch against the current poppler development library on freedesktop.org. The patch simply pulls out the July 26, 2009 bad code committed to the drawImageMaskPrescaled method and replaces it with the method code before that commit. The original bad commit tried to replace the old, working code with new code using the (as of then) new cairo functionality for drawing outside of a pattern. So either the poppler maintainers will commit my patch, get it working, and then at some point try to re-implement that new cairo functionality, or they will simply try to fix the problem in their original bad commit.

To put it more simply, my patch fixes this problem. As far as the patch getting committed to poppler, or getting downstream to Ubuntu, I've talked about that above.

affects: evince (Ubuntu) → poppler (Ubuntu)
summary: - The current version (2.28.1) does not render some documents that worked
- perfectly under earlier versions.
+ poppler (by evince) could render this pdf prior to 0.12.0, now can not.
Changed in poppler:
status: Unknown → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote : Re: poppler (by evince) could render this pdf prior to 0.12.0, now can not.

Thank you for your bug report

Changed in poppler (Ubuntu):
status: Confirmed → Triaged
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
Revision history for this message
In , Dsheil (dsheil) wrote :

This now works for me with evince-2.29.5, a 2 day old version of poppler (6825a219f0bc0ac6fd469fb8a6ebb86df774375f) and a 17 day old version of cairo (4204605813d93e7e2f0d8761e90a6dd6b8089dcb).

It looks like sometime between the June 16th, 2009 1.8.8 release of cairo, and the cairo git of 17 days ago, the code in cairo messing this up was fixed. So this now works.

affects: poppler (Ubuntu) → cairo (Ubuntu)
summary: - poppler (by evince) could render this pdf prior to 0.12.0, now can not.
+ Old cairo version in Ubuntu 9.10 does not render PDF properly
Revision history for this message
Dennis Sheil (dennis-sheil) wrote :

When evince and poppler link to the existing cairo library in Karmic Koala, cairo 1.8.8, then the PDF displays incorrectly. When evince and poppler link to the latest development cairo version in git, then the PDF displays correctly. The bug was in the old version of cairo, which is fixed in git master.

Changed in cairo (Ubuntu):
status: Triaged → Fix Committed
Changed in poppler:
status: Confirmed → Fix Released
Revision history for this message
madbiologist (me-again) wrote :

I've just tested this with Ubuntu 10.10 alpha 2 updated to the latest versions of poppler and Evince. This bug is now fixed.

Uname: Linux 2.6.35-6-generic i686
Packages:
    evince 2.30.3-1ubuntu2
    poppler 0.14.1-0ubuntu1
    libcairo2 1.9.12-1

Changed in cairo (Ubuntu):
status: Fix Committed → Fix Released
Changed in poppler:
importance: Unknown → Medium
Changed in poppler:
importance: Medium → Unknown
Changed in poppler:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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