[cairo] PDF text doesn't render

Lichtl, Adam alichtl at bnl.gov
Thu Sep 20 15:18:48 PDT 2007


Hi Carl,

Attached are two more files which really get to the root of my pdf problem.  The "sample_ps2pdf.pdf" file is perfect - it was made from a .tex file including the .ps graphics from cairo, and was created by "latex" followed by "ps2pdf."  The "sample_pdflatex.pdf" is made from a .tex file including the .pdf graphics from cairo, and is a mess -- it only looks reasonable on acroread (although the colors looked washed out when compared to "sample_ps2pdf.pdf"!)

Can this be fixed in cairo?

Thanks,
-Adam

-----Original Message-----
From: Carl Worth [mailto:cworth at cworth.org]
Sent: Thu 9/20/2007 4:41 PM
To: Lichtl, Adam
Cc: cairo at cairographics.org
Subject: Re: [cairo] PDF text doesn't render
 
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
	https://bugs.freedesktop.org/show_bug.cgi?id=12143

> 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).

-Carl


-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample_pdflatex.pdf
Type: application/pdf
Size: 12087 bytes
Desc: sample_pdflatex.pdf
Url : http://lists.cairographics.org/archives/cairo/attachments/20070920/3cb36db2/attachment-0002.pdf 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample_ps2pdf.pdf
Type: application/pdf
Size: 17652 bytes
Desc: sample_ps2pdf.pdf
Url : http://lists.cairographics.org/archives/cairo/attachments/20070920/3cb36db2/attachment-0003.pdf 


More information about the cairo mailing list