[cairo] PDF backend: PDF trailer not written?
Sascha Steinbiss
steinbiss at zbh.uni-hamburg.de
Tue Dec 2 01:46:58 PST 2008
Adrian Johnson wrote:
> 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.
> 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));
Thanks. I actually tried that before after each page and drawing
operation set (which reported "success"), but not after the
cairo_surface_finish() call. Doing so now reports "input string not
valid UTF-8".
I suppose this does not refer to any text drawn via cairo_show_text()?
Any text I draw is read from a properly UTF8-encoded file. So what
"input string" does this message refer to, and why doesn't it seem to
cause a problem in the older version?
Sascha
--
Sascha Steinbiss
Zentrum für Bioinformatik
Universität Hamburg
Bundesstr. 43
20146 Hamburg
Germany
Email: steinbiss at zbh.uni-hamburg.de
URL: http://www.zbh.uni-hamburg.de/steinbiss
Phone: +49 (40) 42838 7322
FAX: +49 (40) 42838 7312
More information about the cairo
mailing list