evince displays the included PDF without rotation

Bug #711300 reported by Egon Geerardyn
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Poppler
Fix Released
Medium
poppler (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: evince

When using a PDF file which has an included PDF figure that is rotated, evince displays the included PDF without rotation. Other viewers (e.g. Adobe Reader and some other reader on Windows of which the name slips my mind) show the included PDF as intended.

If you need an example file, I can provide one that displays wrong on Evince and right on other viewers.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: evince 2.32.0-0ubuntu1.1
ProcVersionSignature: Ubuntu 2.6.35-24.42-generic 2.6.35.8
Uname: Linux 2.6.35-24-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Tue Feb 1 15:13:35 2011
ExecutablePath: /usr/bin/evince
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
KernLog:
 Jan 30 07:35:29 Egon-PCx kernel: [320248.513583] type=1400 audit(1296369329.597:240877): apparmor="ALLOWED" operation="mknod" parent=1 profile="/usr/sbin/nmbd" name="/var/run/samba/namelist.debug" pid=1955 comm="nmbd" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
 Jan 30 07:35:29 Egon-PCx kernel: [320248.513591] type=1400 audit(1296369329.597:240878): apparmor="ALLOWED" operation="open" parent=1 profile="/usr/sbin/nmbd" name="/var/run/samba/namelist.debug" pid=1955 comm="nmbd" requested_mask="wc" denied_mask="wc" fsuid=0 ouid=0
SourcePackage: evince

Related branches

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

Bug forwarded from Evince: https://bugzilla.gnome.org/show_bug.cgi?id=628597

"The Story:
I had a pdf-image, that was rotated using pdftk. This image was included in a
pdflatex run as embedded image. The resulting pdf is correctly displayed in
Adobe Reader, but within Evince, this image is unrotated (off be 90°)...
Unfortunately I cannot give the example, but I'll try to come up with a
test-file within a few days...

For now, my analysis of the pdf shows that there is the following sequence
within the pdf:
12 0 obj <<
/Type /XObject
/Subtype /Form
/FormType 1
/PTEX.FileName (C:/the/path/to/rotated_picture.pdf)
/PTEX.PageNumber 1
/PTEX.InfoDict 28 0 R
/Matrix [0 -1 1 0 0 596.25]
/BBox [0 0 596.25 843]
/Group 13 0 R
/Resources <<
/ExtGState <<
/s5 29 0 R
.....

My guess would be that Evince does not correctly parse the /Matrix for the
XObject, as the Matrix
0 -1
1 0
would correspond to the missing rotation...

Best regards,
Chewi"

Test case is attached to the original bug report. I confirm it works with splash.

Revision history for this message
Egon Geerardyn (egon-geerardyn-gmail) wrote :
Revision history for this message
Marcel Stimberg (marcelstimberg) wrote :

Thank you for your bug report. Yes, please attach a sample file.

Changed in evince (Ubuntu):
status: New → Incomplete
Revision history for this message
Egon Geerardyn (egon-geerardyn-gmail) wrote :

This is the included file, it displays fine both on Adobe reader and Evince on its own.

Revision history for this message
Egon Geerardyn (egon-geerardyn-gmail) wrote :

And this is PDF file with the other file included, all made with pdfLaTeX, nothing really fancy and I'm not rotating the image in LaTeX either. This file displays well in Adobe Reader, but in Evince the included file is turned on its side.

If you have any use for the LaTeX code, which I doubt (okay, not the exact source, I left out some parts, but it compiles and reproduces the bug)

\documentclass[pdftex,a4paper]{article}
%% PACKAGES
\usepackage[dutch]{babel}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[pdftex,pdfpagelabels]{hyperref}
\begin{document}
  \begin{figure}[h!]
  \centering
  \includegraphics{circuit.pdf}
  \caption{Device Under Test}
  \label{fig:dut}
  \end{figure}
\end{document}

Revision history for this message
Marcel Stimberg (marcelstimberg) wrote :

Thanks, I can confirm the problem. It is rendered correctly with xpdf and okular, evince and epdfviewer show the rotated picture. The issue therefore seems to be in the poppler cairo backend (okular uses poppler, but with the splash backend). The problem is still reproducable with the poppler version in Ubuntu Natty (0.16.0-0ubuntu2).

Changed in evince (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
In , Marcel Stimberg (marcelstimberg) wrote :

This issue is still reproducable with poppler 0.16.0, see this Ubuntu bug report for another example: https://bugs.launchpad.net/ubuntu/+source/evince/+bug/711300

Revision history for this message
Marcel Stimberg (marcelstimberg) wrote :

There's already an upstream report about the issue, you can track it and make comments at: https://bugs.freedesktop.org/show_bug.cgi?id=29968

affects: evince → poppler
affects: evince (Ubuntu) → poppler (Ubuntu)
Changed in poppler:
status: Unknown → Confirmed
Revision history for this message
In , José Aliste (jose-aliste) wrote :

Indeed, we are ignoring the TransformationMatrix from the state in CairoOutputDev::BeginTransparencyGroup. Caching the state->getCTM() into a cairo_matrix_t and then calling cairo_set_matrix with this matrix at the begining of CairoOutputDev::PaintTransparencyGroup works when scale = 1 but (not surprisingly) does not scale properly when rendering at bigger scales.

Changed in poppler:
importance: Unknown → Medium
Revision history for this message
In , Adrian Johnson (ajohnson-redneon) wrote :

Created attachment 55629
fix ctm when painting groups

Patch to fix. Similar to the set soft mask bugs we need to store the current ctm during beginTransparencyGroup when the group is created and use this ctm when painting the group.

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

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

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

Comment on attachment 55629
fix ctm when painting groups

Review of attachment 55629:
-----------------------------------------------------------------

Patch looks good to me and it doesn't introduce regressions in my tests, so please, push it to both branches. Thanks!

Changed in poppler:
status: Confirmed → Fix Released
Changed in poppler (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Fix Committed
summary: - rotated included PDF
+ evince displays the included PDF without rotation
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package poppler - 0.18.4-0ubuntu1

---------------
poppler (0.18.4-0ubuntu1) precise; urgency=low

  * New upstream version:
    - "evince displays the included PDF without rotation" (lp: #711300)
    - Contents of the page is not displayed while it is OK
      with xpdf or acroread (lp: #878715)
  * debian/control:
    - libpoppler-glib-dev shouldn't depends on libgtk-dev, it stopped using
      gdk and uses cairo directly (lp: #870662)
 -- Sebastien Bacher <email address hidden> Thu, 16 Feb 2012 15:36:47 +0100

Changed in poppler (Ubuntu):
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.