[cairo] PDF text doesn't render

Carl Worth cworth at cworth.org
Thu Sep 20 13:41:10 PDT 2007

On Thu, 20 Sep 2007 16:16:56 -0400, "Lichtl, Adam" wrote:
> I'm using a Mac, and you are right- the pdf file works in gv, xpdf,
> and acroread, but not in Preview.  I wonder what is different about
> these different programs.. I thought pdf was supposed to be a
> universal format!!

It certainly would be nice, but it's definitely not the case.

All PDF viewers have bugs, (some more than others).

The best we can do in cairo is to try to emit correct PDF and also to
try to emit that subset of PDF that is most compatible across
viewers. This is very difficult to do in practice, and as cairo's PDF
output has been improving during the 1.5.x series, (more vectors and
less rasterization), the subset of the PDF language that needs to be
correctly implemented by the viewer is unfortunately increasing.

> I've also noticed that using set_source_rgba has
> different effects in different viewers - it works fine in Preview
> and acroread, but not in xpdf or gv.  This is certainly strange (and
> frustrating).

Yes, PDF viewer bugs are definitely frustrating. We do work closely
with the developers of the poppler library, (forked from the xpdf
code), to help it improve to be able to handle anything that cairo
relies on. One way we are doing that is with this tracker bug that has
dependent bugs for everything we've noticed where poppler does not yet
support some features of cairo-pdf output:

	Poppler does not yet handle everything in the cairo test suite

> Is this going to be fixed in future versions of cairo?  It seems to
> me that the PostScript surface is perfect except for bounding box
> information, and the PDF surface just needs to implement whatever
> ps2pdf does.

We would definitely like to improve cairo's PostScript and PDF output
as much as possible. One thing that might help is if you could supply
two minimal PDF files---one that demonstrates the Preview bug and one
that avoids it.

Also, if you could mention exactly what bounding-box information is
needed by ps2pdf. If you don't know, then again, you might supply two
minimal PostScript files---one that ps2pdf likes and one that it
doesn't like.

Information like that can definitely help us in improving cairo's
output to be more resilient against viewer bugs, (and to also root out
any actual bugs in cairo's output).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20070920/7a22276e/attachment.pgp 

More information about the cairo mailing list