GNOME Bugzilla – Bug 349826
GTK+ produces invalid PDF on amd64
Last modified: 2006-08-07 22:11:43 UTC
When executing test/print-editor on amd64 and printing to PDF, the resulting PDF seems to be sometimes invalid, depending on the selected font. The default "Sans 12" leads to a PDF that evince complains about by printing "Error: failed to load truetype font" to the terminal and only showing an empty page. Same with "Verdana". However, some less-standard fonts like "Rudelsberg" seem to work. Unfortunately, I have no printer installed on linux, so I cannot test whether really printing the pages works correctly. The problem seems not to appear on 32-bit systems.
(For reference, this bug report grew out of wrapping the new printing API in gtkmm. See Bug #347857 for background)
Any chance you could attach an example of a "bad" pdf file ?
Created attachment 70276 [details] PDF file generated on amd64 with Font "Sans 12" I typed "Foobar" into the editor textview and printed it to PDF using the default font (Sans 12). evince fails to display it.
I also noted that sometimes when trying to print, the test application either runs into an endless loop (CPU jumps to 100%, window does not respond anymore) or terminates with the following message: lt-print-editor: cairo-array.c:206: _cairo_array_index: Assertion `0 <= index && index < array->num_elements' failed. However, this behaviour is not reproducible.
Created attachment 70277 [details] gdb backtrace of the failed assertion shown in comment #4 Managed to get a gdb backtrace of that failed assertion.
I just noticed a known cairo amd64-and-PDF-related problem in the cairo ROADMAP for cairo 1.2.2 (http://gitweb.freedesktop.org/?p=cairo;a=blob;f=ROADMAP#l58) that seems not to be filed in the cairo bugtracker. The referenced mailing list thread is not entirely accessible in the archives (I cannot see the mail content from Carl Worth's mails, but just the PGP signature), but I guess this might be closed if it's really a cairo bug.
Yes, we plan to track and fix this for the upcoming 1.2.2 release.
Armin, can you check out the patch in: http://lists.freedesktop.org/archives/cairo/2006-August/007550.html and see if that fixes the problem? You need the latest cairo from git master to apply that patch. Thanks,
Yes, the patch works flawlessly.
I can confirm that the latest version of cairo (which includes the patch) seems to fix this issue for me as well. I assume we can probably close this bug now.
Thanks.