Evince displays pdf file fine, but prints colors inverted

Bug #1560286 reported by Staten O.
70
This bug affects 13 people
Affects Status Importance Assigned to Milestone
cairo (Ubuntu)
Fix Released
High
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Cosmic
Fix Released
Undecided
Unassigned

Bug Description

* Impact
In some files images are printed with inverted colors

* Test case
open https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/1560286/+attachment/5226857/+files/978-1-57896-287-7%20LL4%20SW%20Sem%201%20Reduced%20p.17.pdf in evince, click on the print preview, the colors should be right

* Regression potential
it's a change in the code dealing with specific adobe file, test opening the example in different document viewer and try with some other files (the bug has several example), they should display the correct image/colors

--------------------

I have several pdf files that when opened by evince, they appear to be fine until I try to print them. When I do, they print with the colors inverted (the printout looks like a photograph negative). This color inversion also occurs when viewed in the print preview screen. If I click on File > Properties, I get some information...
Producer : Adobe Acrobat 15.10 Image Conversion Plug-in
Creator : Adobe Acrobat 15.10
...
Format : PDF-1.6
...

I am running ubuntu 14.04 LTS

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: evince 3.10.3-0ubuntu10.2
ProcVersionSignature: Ubuntu 3.13.0-83.127-generic 3.13.11-ckt35
Uname: Linux 3.13.0-83-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Mar 21 21:01:45 2016
ExecutablePath: /usr/bin/evince
InstallationDate: Installed on 2012-07-24 (1336 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
ProcEnviron:
 LANGUAGE=en_US
 PATH=(custom, user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: evince
UpgradeStatus: Upgraded to trusty on 2014-09-29 (539 days ago)

Revision history for this message
Staten O. (toon0) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in evince (Ubuntu):
status: New → Confirmed
Revision history for this message
Marat Khalili (mkh-t) wrote :

I'm also seeing this on some PDFs in Evince from 14.04. Images appear correctly in main window, but become inverted in print preview and in paper printout.

When I extract images from these PDFs using pdfimages tool, extracted images also appear inverted. Looks like some versions of Acrobat embed images inverted and uninvert them on output, and this last step is omitted by Evince when printing.

Revision history for this message
Jiří Vyskočil (sliwowitz) wrote :

Same here with 18.04. Evince prints some PDF images in inverted colors, while Firefox would print them just fine.

Revision history for this message
Jiří Vyskočil (sliwowitz) wrote :
Revision history for this message
florin (florin-arjocu) wrote :

I add a pdf I get this in Ubuntu 18.10. Printing page 7 (and on), images look inverted. Only images, text is good. I printed as PDF and they turn dark (inverted I guess). Then I printed as Postscript (.ps) and they look fine, so a workaround would be to print files as postscript and then print them on the paper, but it is not a real solution.

Revision history for this message
florin (florin-arjocu) wrote :

This is page 7 printed as PDF, exactly as it gets out of the printer.

Revision history for this message
florin (florin-arjocu) wrote :

Found this Cairo edit, I have no idea if it is final or committed (some one here might know):

https://gitlab.freedesktop.org/cairo/cairo/commit/bf597b89288b6271f56031d5a20bfaf59f146d4c

Revision history for this message
bitinerant (bitinerant) wrote :

Same issue here, Ubuntu 18.04. We're having a hard time finding a way to print these documents. I am attaching a screenshot.

Revision history for this message
bitinerant (bitinerant) wrote :

And here is the 1-page PDF used in the above screenshot.

Revision history for this message
felix (felix-wolfsteller) wrote :

I guess its about embedded cmyk images. Can be inspected with

$ pdfimages /tmp/previewZTSTVZ.pdf -list
page num type width height color comp bpc enc interp object ID x-ppi y-ppi size ratio
--------------------------------------------------------------------------------------------
   1 0 image 818 750 cmyk 4 8 jpeg no 7 0 155 155 183K 7.6%

A "process workaround" is to open the images in libreoffice draw and print them from there, but obviously the underlying library should be fixed.

Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in evince (Ubuntu):
importance: Undecided → High
status: Confirmed → Fix Committed
affects: evince (Ubuntu) → cairo (Ubuntu)
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue is fixed in 1.16 in disco, SRUs have been uploaded to cosmic & bionic

Changed in cairo (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Staten, or anyone else affected,

Accepted cairo into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cairo/1.15.12-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in cairo (Ubuntu Cosmic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-cosmic
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Staten, or anyone else affected,

Accepted cairo into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cairo/1.15.10-2ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in cairo (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Borut Mrak (b9bit) wrote :

This fixed the bug for me.

I did not enable -proposed, just downloaded and upgraded this packages:

{{{
$ dpkg -l \*cairo\* | grep ^ii | grep 1.15.10
ii libcairo-gobject2:amd64 1.15.10-2ubuntu0.1 amd64 Cairo 2D vector graphics library (GObject library)
ii libcairo-script-interpreter2:amd64 1.15.10-2ubuntu0.1 amd64 Cairo 2D vector graphics library (script interpreter)
ii libcairo2:amd64 1.15.10-2ubuntu0.1 amd64 Cairo 2D vector graphics library
ii libcairo2-dev:amd64 1.15.10-2ubuntu0.1 amd64 Development files for the Cairo 2D graphics library
}}}

Thanks!

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cairo - 1.15.10-2ubuntu0.1

---------------
cairo (1.15.10-2ubuntu0.1) bionic; urgency=medium

  * debian/patches/git_adobe_cmykcolors.patch:
    - "Revert "Correctly decode Adobe CMYK JPEGs in PDF export"
      From further testing and investigation it appears that many PDF viewers
      already have a workaround to invert Adobe CMYK JPEGs, so our generated
      PDFs display incorrectly with those viewers due to double-inversion.
      (lp: #1560286)

 -- Sebastien Bacher <email address hidden> Tue, 22 Jan 2019 15:17:42 +0100

Changed in cairo (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of the Stable Release Update for cairo has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

The previous has the right color onces 1.15.12-1ubuntu0.1 installed on cosmic, marked cosmic verified as well now

tags: added: verification-done verification-done-cosmic
removed: verification-needed verification-needed-cosmic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cairo - 1.15.12-1ubuntu0.1

---------------
cairo (1.15.12-1ubuntu0.1) cosmic; urgency=medium

  * debian/patches/git_adobe_cmykcolors.patch:
    - "Revert "Correctly decode Adobe CMYK JPEGs in PDF export"
      From further testing and investigation it appears that many PDF viewers
      already have a workaround to invert Adobe CMYK JPEGs, so our generated
      PDFs display incorrectly with those viewers due to double-inversion.
      (lp: #1560286)

 -- Sebastien Bacher <email address hidden> Tue, 22 Jan 2019 15:10:03 +0100

Changed in cairo (Ubuntu Cosmic):
status: Fix Committed → Fix Released
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.