
On Sat, 2006-10-28 at 13:18 -0700, Bryce Harrington wrote:
- Identify feature differences between the three PDF implementations
Here's what I've got so far, though looking at the issue list for the cairo stuff, it looks like I could stand to add some additional features to the spreadsheet.
Feature Extension "PDF" (pdf-out.cpp) "Cairo PDF" (cairo-pdf-out.cpp) "Cairo PDF experimental" (cairo-renderer-pdf-out.cpp) stroke-opacity (solid) yes yes yes fill-opacity (solid) yes yes yes linearGradient (fill) yes incorrect incorrect linearGradient (stroke) no incorrect incorrect radialGradient (fill) yes incorrect incorrect radialGradient (stroke) no incorrect incorrect stop-opacity no yes yes image yes yes yes fill-opacity (gradient) no yes yes stroke-opacity (gradient) no yes yes text (as text) no no no text (as path) yes yes yes flowText (as text) no no no flowText (as path) yes yes yes opacity (path) yes yes yes opacity (image) no yes yes opacity (fill +stroke) incorrect incorrect incorrect opacity (group) incorrect incorrect incorrect
It looks like today, with stock Cairo 1.2 in Ubuntu, the general results are better with the Cairo PDF backends than the "legacy" PDF backend.
However, given the features I tested above, we've got three problems:
1. Gradient rendering problems resulting from the use of CAIRO_EXTEND_NONE instead of CAIRO_EXTEND_PAD (although we'll also need to see whether CAIRO_EXTEND_PAD is supposed by the stuck PDF backend...).
2. There's no option to embed text as text.
3. _ALL_ the PDF implementations seem to have been written with the bogus idea that alpha compositing is commutative/distributive. Compositing two rectangles with 0.5 alpha is NOT the same thing as compositing a group (of two rectangles) having 0.5 alpha. Similarly with fills and strokes, which should be treated as if there were a group containing a fill object and a stroke object, rather than simply multiplying fill-opacity and stroke-opacity by the object opacity.
- Cairo-based PDF renderer
- Add optimizations like creating surfaces with only the needed bbox size, rather than the full size of the output
- objectBoundingBox clipping doesn't work... need to find out why
- Cairo-PDF patches are not yet finished. These will need to be incorporated into Cairo.
- Text is quite unstable (isn't being shown except in 'root' layer)
- Images are unstable
- Masking is supported only with constant alpha
Can Miklós or somebody separate these into the issues that need to be addressed at the Cairo level, and the issues which need to be addressed in our own backend?
- Ensure blur works with export to pdf via rasterizing of blurred objects in a fixed resolution
Unless someone's feeling extra motivated, we'll probably have to punt on PDF blur for this release.
Could someone suggest ways to test everything that'll need to be supported?
doc/PDF Feature Matrix.svg has test cases for everything on the corresponding spreadsheet. I'm afraid that none of the Open Source PDF viewers I've tried so far have complete enough support for PDF to do the entire test suite correctly, so the test results will have to be checked in Adobe Acrobat Reader.
-mental