Loic: The problems appears to be that cairo adds a newline character
(0x0A) at the end of any binary type 1 font definition in the PDF. This
is the thing that the patch fixes, so you can check for that.

Since I'm not really familiar with the PDF file format, and the font
definitions/declarations seem to be somehow encoded, I did the
following:

* Open bug triggering PDF in evince (e.g. XAFSPhoton.. from this bug report)
* Print to file in PostScript format (this is to find out the font definitions)
* Print to file in PDF format (this triggers the bug)

* Open Postscript file and look for "/FontType 1 def", this starts the font 
definition.
* Go to the end of the hex output of this font (just before the lines with 
zeroes at least in my PDFs) and copy/note the last 10 characters (i.e. 5 8bit 
hex numbers) or so (this is so you can find the font def in the PDF).

* Open the printed PDF file in a hex editor and search for the noted hex 
sequence.
* This should be just before the string "endstream" in the PDF.

* If immediately after the noted hex sequence (i.e. the next hex number) is 
"0A", this is the bug.
* If it is any other value, the bug is fixed (basically the 0A is inserted 
additionally in the bug case, so the font definition is also 1 character 
longer).


I hope this helps and sorry if it's not suitable as a test case... as mentioned 
I'm not really an expert in PDF/PS.

-- 
Printing from evince (and perhaps other GTK apps) to PostScript printers is 
broken
https://bugs.launchpad.net/bugs/419143
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to