[cairo] Empty pdf output under Mac OS 10.7 (Lion)

Ethan Tira-Thompson ejt at cmu.edu
Mon Jul 25 09:04:39 PDT 2011


No matter what I do with my cairo pdf surface calls (both my own code and also rsvg-convert), it consistently generates a 414 byte file with PDF headers and footer, but no ‘content'. Thus, Preview and Adobe Reader complain about an invalid file (Preview says it "can't be opened" and that it is damaged or unknown format, whereas Reader complains it "has no pages”).  If I restrict the cairo version to 1.4, I see it does change the version number in the header, but that's the only diff.

PDF export actually worked in Lion with a cairo binary previously compiled under Snow Leopard.  However, I eventually triggered a recompile and now the new cairo binary is no long functional for PDFs.  PNG and other surfaces do work.

This is primarily with 1.10.2, but I have also tried a few 1.11.2 builds, which don’t seem to change anything.

There’s some discussion here
  http://comments.gmane.org/gmane.os.apple.macports.devel/15083
that suggestions the llvm backend may be to blame, but my own test with gcc-4.2 suggests that’s not the whole story.  FYI were some llvm issues with the build scripts however:
  https://trac.macports.org/ticket/29842
I attached a sample of the bad pdf output there if that would be helpful:
  https://trac.macports.org/attachment/ticket/29842/bad_cairo_output.pdf

Anyway, not sure where to start looking at this, it seems like a very strange error.  Some pointers would be appreciated.

Thanks,
  -Ethan



More information about the cairo mailing list