[cairo] Empty pdf output under Mac OS 10.7 (Lion)
ajohnson at redneon.com
Mon Jul 25 15:40:52 PDT 2011
On 26/07/11 01:34, Ethan Tira-Thompson wrote:
> 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
> 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:
> I attached a sample of the bad pdf output there if that would be helpful:
> Anyway, not sure where to start looking at this, it seems like a very strange error. Some pointers would be appreciated.
I suggest checking the surface status with cairo_surface_status() after
calling cairo_surface_finish(). You should be always doing this in your
code to check if the PDF output succeeded. cairo_status_to_string() will
print the error message.
If you set a breakpoint on _cairo_error() you can identify the line of
code where it is failing.
> cairo mailing list
> cairo at cairographics.org
More information about the cairo