Size 0 dots are large and visible

Bug #902033 reported by wch
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Poppler
Confirmed
Medium
poppler (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

I'm creating some PDF files with dots of 0 size. In evince, they're visible: they're pretty large and off-center. In other viewers, such as Mac Preview and Adobe Reader on Mac, the dots are not visible.

This code will generate a test file in R. There is a line of 10 dots going from lower left to upper right that should be visible. There's another line of 0mm dots going from upper left to lower right, and they should not be visible.

library(grid)
pdf("dotsizetest.pdf", width=4, height=4)
x <- y <- 1:10
pushViewport(plotViewport(c(5.1, 4.1, 4.1, 2.1)))
pushViewport(dataViewport(x, y))
grid.rect()
grid.points(x, y)
grid.points(x, 10-y, gp=gpar(fill="black"), size=unit(0,"mm"))
popViewport(2)
dev.off()

EXPECTED RESULT:
One diagonal line of dots

ACTUAL RESULT:
Two crossing diagonal lines of dots.

$ lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10

$ apt-cache policy evince
evince:
  Installed: 3.2.1-0ubuntu2
  Candidate: 3.2.1-0ubuntu2
  Version table:
 *** 3.2.1-0ubuntu2 0
        500 http://mirror.anl.gov/pub/ubuntu/ oneiric-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.2.0-0ubuntu1 0
        500 http://mirror.anl.gov/pub/ubuntu/ oneiric/main amd64 Packages

Tags: oneiric trusty
Revision history for this message
wch (winston-stdout) wrote :
Revision history for this message
In , Marcel Stimberg (marcelstimberg) wrote :

This has been reported in the Ubuntu bug tracker by wch: https://bugs.launchpad.net/ubuntu/+source/evince/+bug/902033

It is reproducible on Ubuntu 11.10 with evince 3.2.1-0ubuntu2 and epdfview 0.1.8-1 (poppler 0.16.7-2ubuntu2)

Ubuntu bug report:
I'm creating some PDF files with dots of 0 size. In evince, they're visible: they're pretty large and off-center. In other viewers, such as Mac Preview and Adobe Reader on Mac, the dots are not visible.

This code will generate a test file in R. There is a line of 10 dots going from lower left to upper right that should be visible. There's another line of 0mm dots going from upper left to lower right, and they should not be visible.

library(grid)
pdf("dotsizetest.pdf", width=4, height=4)
x <- y <- 1:10
pushViewport(plotViewport(c(5.1, 4.1, 4.1, 2.1)))
pushViewport(dataViewport(x, y))
grid.rect()
grid.points(x, y)
grid.points(x, 10-y, gp=gpar(fill="black"), size=unit(0,"mm"))
popViewport(2)
dev.off()

EXPECTED RESULT:
One diagonal line of dots

ACTUAL RESULT:
Two crossing diagonal lines of dots.

The PDF can be found here: https://bugs.launchpad.net/ubuntu/+source/evince/+bug/902033/+attachment/2625606/+files/dotsizetest.pdf

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

Thank you for your bug report. I can confirm this also for epdfview which suggest it is a problem in the poppler library and not in evince.

I have reported the bug to the developers of the software. You can track it and make comments at: https://bugs.freedesktop.org/show_bug.cgi?id=43676

affects: evince (Ubuntu) → poppler (Ubuntu)
Changed in poppler (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Albert Astals Cid (aacid) wrote :

Both the splash and the cairo renderer show the second line, but it is true that the cairo renderer has much worse results than the splash one (the second line in splash at least is just 1px wide)

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

Created attachment 56143
cairo - don't render text when text matrix is not invertable

The problem is the PDF file is using a noninvertible text matrix [0 0 0 0]. The PDF specification has this to say about noninvertible matrices:

   When rendering graphics objects, it is sometimes necessary for a
   conforming reader to perform the inverse of a transformation—that
   is, to find the user space coordinates that correspond to a given
   pair of device space coordinates. Not all transformations are
   invertible, however. For example, if a matrix contains a, b, c,
   and d elements that are all zero, all user coordinates map to the
   same device coordinates and there is no unique inverse transformation.
   Such noninvertible transformations are not very useful and generally
   arise from unintended operations, such as scaling by 0. Use of a
   noninvertible matrix when painting graphics objects can result
   in unpredictable behaviour.

So the correct rendering of this PDF file is undefined. However to make the cairo output more closely emulate acroread behavior I attach a patch that ignores text when the text matrix is noninvertible.

Changed in poppler (Ubuntu):
importance: Undecided → Low
Revision history for this message
madbiologist (me-again) wrote :

This should have been fixed in Ubuntu 13.04 "Raring Ringtail". Can you test in Ubuntu 13.10 "Saucy Salamander" and confirm?

Changed in poppler (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
madbiologist (me-again) wrote :

This is still occurring on Ubuntu 14.04 "Trusty Tahr".

uname: Linux 3.13.0-24-generic i686

evince 3.10.3-0ubuntu10
poppler 0.24.5-2ubuntu4

tags: added: oneiric trusty
Changed in poppler (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
In , madbiologist (me-again) wrote :

Any plans to merge this patch to mainline>

I can still reproduce this bug on poppler 0.24.5.

Revision history for this message
madbiologist (me-again) wrote :

This should finally be fixed in poppler 0.28.1, which is available in Ubuntu 15.04 "Vivid Vervet" as poppler 0.28.1-1ubuntu1. Can you please test and report back here?

Changed in poppler (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
madbiologist (me-again) wrote :

Fixed on Ubuntu 16.04 "Xenial Xerus".

evince 3.18.2-1ubuntu4
poppler 0.41.0-0ubuntu1.1
libcairo2 1.14.6-1

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