With cairo's recent 1.6.4 release, we've hoped to reach the nirvana of
applications that display and print documents with perfect
With cairo's recent 1.6.4 release, we've hoped to reach the nirvana of
applications that display and print documents with perfect
First, here's the simplest web page I was able to construct to show
the problem, (nothing more than a single-cell table with a border):
First, here's the simplest web page I was able to construct to show
the problem, (nothing more than a single-cell table with a border):
already seen problem #1. Note that the file size has increased by a
factor of 100 compared to the original HTML. The PDF does have more
content, (firefox adds a header and footer for example), but nothing
already seen problem #1. Note that the file size has increased by a
factor of 100 compared to the original HTML. The PDF does have more
content, (firefox adds a header and footer for example), but nothing
Next, we can use the poppler library, (with evince or a pdf2ps
utility), to read the PDF file and use cairo to generate a PostScript
Next, we can use the poppler library, (with evince or a pdf2ps
utility), to read the PDF file and use cairo to generate a PostScript
To explain a bit, (but ignoring many gory details), a PDF knockout
group can be a very complicated thing, so poppler has some fairly
sophisticated code to handle these. This support involves rendering
To explain a bit, (but ignoring many gory details), a PDF knockout
group can be a very complicated thing, so poppler has some fairly
sophisticated code to handle these. This support involves rendering
back to image-based rendering for things. The irony here is that the
only reason cairo is using a knockout group in the original PDF file
is to _prevent_ any compositing from happening, (the fallback image
back to image-based rendering for things. The irony here is that the
only reason cairo is using a knockout group in the original PDF file
is to _prevent_ any compositing from happening, (the fallback image
If it were only for those first two bugs, the intermediate file sizes
would have been larger than normal, but the final result would have
looked great and printed just fine. And in that case, I probably would
have never even received a bug report.
If it were only for those first two bugs, the intermediate file sizes
would have been larger than normal, but the final result would have
looked great and printed just fine. And in that case, I probably would
have never even received a bug report.
-But there's a third problme that is the most pernicious, because it
-results in the final result looking ust awful. When cairo inserts the
+But there's a third problem that is the most pernicious, because it
+results in the final result looking just awful. When cairo inserts the
full-page fallback into the final PostScript file, it is inserting it
at 300dpi, but it does that only after rendering it to an intermediate
72dpi image, which is then scaled up. That's why the final PostScript
full-page fallback into the final PostScript file, it is inserting it
at 300dpi, but it does that only after rendering it to an intermediate
72dpi image, which is then scaled up. That's why the final PostScript
mailing list over the past couple of days, beginning here:
[Bug with fallback resolution of
mailing list over the past couple of days, beginning here:
[Bug with fallback resolution of
In that series of posts I coded a minimal test case in cairo's test
suite for the resolution problem, and a patch that fixes that test
case. But when I use a patched cairo for the PDF to PostScript
conversion of the file described here, I end up with the following
In that series of posts I coded a minimal test case in cairo's test
suite for the resolution problem, and a patch that fixes that test
case. But when I use a patched cairo for the PDF to PostScript
conversion of the file described here, I end up with the following
Here, there's still a giant, full-page fallback image, (this is
expected since I haven't touched poppler yet). And the image is at
Here, there's still a giant, full-page fallback image, (this is
expected since I haven't touched poppler yet). And the image is at
file). However, the original HTML table is now entirely missing. So
there's definitely something wrong with my patch.
file). However, the original HTML table is now entirely missing. So
there's definitely something wrong with my patch.
-I'll continue to chase these bugs down, and continue my quest to get
-high-quality display and print output from cairo-using
-applications. It can be a difficult goal, but it's also a lot of fun
-and very rewarding.
-
-Please feel free to jump in and help if you're interested.
+I'll continue to chase these bugs down. The interesting thing about
+this chain is that it's only as strong as its weakest link. Fixing any
+of the individual problems here will make the end-to-end behavior be
+quite acceptable.
+And I'll continue my quest to get high-quality display and print
+output from cairo-using applications. It can be a challenging goal,
+but it's also a lot of fun and very rewarding. Please feel free to
+jump in and help if you're interested.