[cairo] PDF backend: PDF trailer not written?
Adrian Johnson
ajohnson at redneon.com
Mon Dec 1 12:12:51 PST 2008
Sascha Steinbiss wrote:
> My question is now: is it basically possible to corrupt PDF output,
> especially getting the PDF trailer dict omitted, only by drawing
> operations on a cairo_t without ever doing nasty things with the
> surface? If so, I would be glad to get some directions on how to ensure
> the PDF is complete. If this may be a bug, I can give more extensive
> code examples (although I cannot provide a minimal example without
> dependencies to my code at the moment, as I do not see the most likely
> cause yet). System is Linux, Arch to be exact.
>
> Thanks in advance,
> Sascha
An incomplete PDF file is a result of an error occurring while creating
the PDF. You can check the surface status to find out what went wrong.
For example:
cairo_surface_finish (surface);
status = cairo_surface_status (surface);
cairo_surface_destroy (surface);
printf("%s\n", cairo_status_to_string (status));
More information about the cairo
mailing list