Evince does not print hyphens in some PDF documents (cairo bug)

Bug #1734092 reported by Roland65
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
cairo
Fix Released
High
cairo (Ubuntu)
Fix Released
High
Unassigned

Bug Description

In some PDF files, characters like hyphen (minus sign) and others symbols are not printed in Evince.

According to https://bugs.freedesktop.org/show_bug.cgi?id=94615, the bug is in version 1.14 of cairo.

The bug was fixed last year in version 1.15 (see https://cgit.freedesktop.org/cairo/commit/?id=190678f6444ad879847d603c3c9eaf8e9ab6887a).

I've backported the above patch in Ubuntu 16.04 xenial, and it fixes the bug.

To reproduce the bug (see attached test files) in Ububtu 16.04 (with libcairo2 1.14.6-1):

1. Create a LaTeX test document (test.tex) with the following content:

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
a-b---
\end{document}

2. Create a test.pdf from test.tex:

pdflatex test.tex

3. Create a cairo pdf output (or print test.pdf on a printer, using Evince):

pdftocairo test.pdf -pdf test1.pdf

Open test1.pdf with Evince: as you can see, some of the hyphen signs have disappeared.

To fix the bug, rebuild the cairo deb packages with the attached patch, install the packages and do (or print test.pdf on a printer, using Evince):

pdftocairo test.pdf -pdf test2.pdf

Now, open test2.pdf with Evince: there is no more missing hyphen sign.

System: Ubuntu 16.04.3 LTS
Packages: libcairo2 (1.14.6-1)

Tags: patch xenial
Revision history for this message
In , Undisclosed-m (undisclosed-m) wrote :

When I print PDF documents generated by pdflatex from Evince, the output often misses hyphens, dashes and similar symbols, which is quite annoying because it makes proofreading those printouts impossible.

Printing the same document from Okular does not result in missing hyphens.

The big can be reproduced without printing using pdftocairo:

> echo "\documentclass{article}\usepackage[T1]{fontenc}\begin{document}a-b---\end{document}" | pdflatex
> pdftocairo -pdf article.pdf out.pdf

If you open article.pdf (in Evince or in Okular), you will see a hyphen and a long dash. If you open out.pdf instead, the dash is missing.

This bug has been observed already in other places:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810617
http://superuser.com/questions/969987/how-to-prevent-missing-hyphens-when-printing-pdf-from-evince

I am running an up-to-date Ubuntu 15.10 on AMD64 with
libpoppler52:amd64 0.33.0-0ubuntu3 and
evince 3.16.1-0ubuntu1.

Revision history for this message
In , Jason Crain (jasoh) wrote :

I'm reassigning this to cairo. The test.pdf document from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810617 looks similar to bug 89082 for fonts using glyph 0, but for type3/user fonts instead of truetype fonts. cairo's pdf and ps output are missing the hypen.

Revision history for this message
In , Undisclosed-m (undisclosed-m) wrote :

The bug is still present with Ubuntu 16.04 Beta 2. However, I cannot reproduce it using Arch though both use the same version of libcairo2 (1.14.6-1) and pdftocairo (0.41.0).

Earlier this year, a colleague observed this bug when printing from Arch, too. So, it seems as some recent changes fixed it there; although I don't know what exactly.

Let me know if you need further information.

Revision history for this message
In , Adrian Johnson (ajohnson-redneon) wrote :
Revision history for this message
In , Adrian Johnson (ajohnson-redneon) wrote :

*** Bug 86535 has been marked as a duplicate of this bug. ***

Revision history for this message
In , chrysn (chrysn) wrote :

Could this patch be backported to the 1.14 branch? I tried the naive approach (just applying the single patch), but the surface->target->is_vector member is absent there.

Revision history for this message
Roland65 (roland65) wrote :
Revision history for this message
In , Roland65 (roland65) wrote :

I've provided a backport patch for Ubuntu 16.04 xenial.

It's here : https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/1734092

dino99 (9d9)
tags: added: patch xenial
Changed in cairo:
importance: Unknown → High
status: Unknown → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cairo (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Alex Korobkin (korobkin) wrote :

*** Bug 105081 has been marked as a duplicate of this bug. ***

Revision history for this message
Sebastien Bacher (seb128) wrote :

the issue is fixed in the current Ubuntu serie

Changed in cairo (Ubuntu):
importance: Undecided → High
status: Confirmed → 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.