Created attachment 14285 [details]
C code that will produce the bad pdf.
I'm attaching a C code, that "Should" generate a pdf file with a red rectangle and a "hi" written in it.
X11 works, png works, ps works, but the pdf backend seems to fail.
I've built PDFlib-Lite-7.0.2.tar.gz as my libpdf, i'm on a Linux box:
2.6.9-55.0.2.EL #1 Tue Jun 12 17:47:10 EDT 2007 i686 i686 i386 GNU/Linux
But i've reproduced this on Mac OS X 10.4 as well and a lot of other linux platform.
Am i using the wrong pdf lib ?
Created attachment 14287 [details]
I ran your test code against 1.5.8 and git, and observed "hi" on top of a red rectangle as expected.
I then trimmed your example to produce the hopefully minimal test case - and in doing so spotted a missing fclose() that could explain why your pdf is blank. Does this updated test case still fail for you, or does simply adding an fclose() to the original test code fix the pdf output?
Yes even with that I can't see the pdf file, neither on my linux or my
Could it be libpdf form pdflite that's wrong?
I'm attaching the pdf file i generate to see if you can see it.
> --- Comment #1 from Chris Wilson <email@example.com> 2008-02-12 08:02:20 PST ---
> Created an attachment (id=14287)
> --> (http://bugs.freedesktop.org/attachment.cgi?id=14287)
> Minimal version
> I ran your test code against 1.5.8 and git, and observed "hi" on top of a red
> rectangle as expected.
> I then trimmed your example to produce the hopefully minimal test case - and in
> doing so spotted a missing fclose() that could explain why your pdf is blank.
> Does this updated test case still fail for you, or does simply adding an
> fclose() to the original test code fix the pdf output?
Created attachment 14288 [details]
my none readable pdf file
Well that pdf has NaN for surface->height, which suggests that it's the #include <cairo-ps.h> rather than #include <cairo-pdf.h> in your test code. Could you make that correction and retest - thanks.
Cairo doesn't use any pdf library btw.
that was it (replace cairo-ps.h with cairo-pdf.h)... VERY embarassing... Sorry I wasted your time for a simple copy/paste error...