Bug 5545 - different output with Cairo backend and PS/Splash backend
Summary: different output with Cairo backend and PS/Splash backend
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Kristian Høgsberg
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-08 04:35 UTC by Christian Krause
Modified: 2006-01-26 11:20 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
this file is rendered differently with Cairo backend (1.27 KB, application/pdf)
2006-01-08 04:37 UTC, Christian Krause
Details
this patch fixes the problem (721 bytes, patch)
2006-01-09 00:07 UTC, Christian Krause
Details | Splinter Review

Description Christian Krause 2006-01-08 04:35:26 UTC
Some time ago I've reported this bug:
http://bugzilla.gnome.org/show_bug.cgi?id=324049
for evince, but I've done some more investigations and it seems, that this is a
bug of the poppler lib.

The attached pdf is rendered differently with the Cairo and the Splash backend:
Rendered by the Splash backend the box has black borders and there is a slanting
line through one edge of the box. This can be reproduce with the test-poppler-qt
tool where it seems that Splash is used:
./qt/test-poppler-qt /tmp/test.pdf

If the cairo backend is used:
glib/test-poppler-glib file:///tmp/demo.pdf 1
display slice.png
Than the box has no border and the single line is missing.

The problem is, that the pdf uses a linewidth of 0.0. According to the pdf
reference: (version 1.6, section: 4.3.2:
"A line width of 0 denotes the thinnest line that can be rendered at device
resolution: 1 device pixel wide." a line with width 0 should be visible.

This works correctly with the other tested backends (e.g. Splash, Postscript),
but not with the cairo backend.

In the cairo backend the width is set by cairo_set_line_width. Unfortunately the
cairo reference doesn't explain in detail how width = 0.0 should be handled. It
seems, that the line is just not drawn.
Comment 1 Christian Krause 2006-01-08 04:37:00 UTC
Created attachment 4286 [details]
this file is rendered differently with Cairo backend
Comment 2 Christian Krause 2006-01-09 00:07:57 UTC
Created attachment 4295 [details] [review]
this patch fixes the problem

I've mailed with the cairo people and they give me the hint, that a line width
of 1/300 inch can be used for zero length postscript/pdf lines:
http://lists.freedesktop.org/archives/cairo/2006-January/005976.html

That's why I suggest to use the attached patch which handles the special case
when the line width == 0.0.
Comment 3 Jeff Muizelaar 2006-01-09 10:05:43 UTC
Looks like it is caused by missing smask support.
Comment 4 Jeff Muizelaar 2006-01-09 12:23:35 UTC
(In reply to comment #3)
> Looks like it is caused by missing smask support.

ignore the comment above comment, it was meant for a different bug.
Comment 5 Kristian Høgsberg 2006-01-27 06:20:59 UTC
Patch comitted, thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.