Hi all,
In a previous message to the list, I said the following:
Lately, I've been seeing numerous postscript errors when printing
from Xprint to HP printers - as a result of the postscript produced
by Xprint. I haven't posted any of these details to the list, as it
didn't appear to be active enough to warrant the effort.
It looks very likely that we're going to have to stop using xprint
because of these errors and other problems (Augment_Printer_List not
working at all, which I've posted about several times).
Sadly all of this has led us to the inevitable conclusion that xprint
simply isn't ready for production usage yet - it's too buggy, there
seems to be no effort to fix these bugs and the almost complete lack
of activity on this list doesn't fill me with confidence that there's
much in the way of ongoing development. I'd love to be proved wrong
however, as it's potentially a very useful piece of software, *if it
works*.
Anyway, I've been doing a bit of investigation into the postscript
errors I mention above, so thought I would share my findings with the
list.
The postscript errors we see are:
Error: invalidfont; OffendingCommand: glyphshow
Almost all of my testing of this has been printing from Firefox 1.0.6
on Fedora Core 3.
Curiously this problem only seemed to affect some users - the same
page would print fine for one user, but fail for another, but for
those affected, the problem was fairly widespread - even reproducable
on printing plain text files from Thunderbird. I initially suspected
that it might be a problem with the emulated postscript in HP
printers, which we have 60+ of here, but the same error was reported
by a Xerox Phaser 4400, which uses proper adobe postscript.
By printing the postscript to a file, I could directly compare the
working PS code with the non-working PS code. I'll include some of
the result of a diff between the working code and the non-working
code below, with my observations interspersed (note that I'm in no way
a postscript expert)...
[kant]toby: diff WORKING-firefox.output.ps BROKEN-firefox.output.ps|head -24
76,77c76,77
< %%BeginFont: Utopia-Regular_iso8859-1
< %!PS-AdobeFont-1.0: Utopia-Regular_iso8859-1
---
%%BeginFont: Utopia-Regular_iso10646-1
%!PS-AdobeFont-1.0: Utopia-Regular_iso10646-1
90c90
< /FontName /Utopia-Regular_iso8859-1 def
---
/FontName /Utopia-Regular_iso10646-1 def
## OK, so the initial difference is that they're specifying different
## font names, although the actual font would appear to be the same
## (as everything else up to %%EndFont is identical)
1107d1106
< /Utopia-Regular_iso8859-1 83 f Tf
1109c1108,1116
< [ /S /e /r /v /i /c /e /s /space /G /r /o /u /p /space /M /e
/e /t /i /n /g /space /M /i /n /u /t /e /s /space /two /zero
/zero /five /hyphen /zero /eight /hyphen /zero /two ]{glyphshow}fa gr gs
---
/S glyphshow
/e glyphshow
/r glyphshow
/v glyphshow
/i glyphshow
/c glyphshow
/e glyphshow
/s glyphshow
gr gs
## This appears to me to be where the problem is. In the working
## example, we see '/Utopia-Regular_iso8859-1 83 f Tf', which I
## assume is specifying the font name to use for the ensuing text.
## Yet, in the broken code this line doesn't appear, so I suspect the
## /S glyphshow line is producing the error, as it doesn't have a font
## specified. As I say though, I'm no postscript expert, so I could
## be wrong here.
Next I looked into what was causing the broken postscript to be
generated - specifically why would the same page print perfectly for
one user, but fail for another, whan all other parameters were the
same (browser, machine, printer)? What I concluded seems very
bizarre...
Starting with a completely vanilla firefox profile (having moved the
~/.mozilla directory out of the way), everything printed fine.
However, if I then go to Edit->Preferences, General, Fonts and Colors
and change one of the font settings here - this leads to the faulty
postcript being produced, which makes absolutely no sense to me. For
instance, if I make an extremely trivial change, such as changing the
monospace font size from the default (12) to 14, this is enough to
make Firefox/Xprint produce the faulty postscript. Note that if I
change the setting back to 12 again, it *still* produces dodgy
postscript, but if I quit firefox, edit prefs.js to remove the lines
it added when I changed the font size from 12 to 14 (which are...
user_pref("font.name.monospace.x-western", "monospace");
user_pref("font.name.sans-serif.x-western", "sans-serif");
user_pref("font.name.serif.x-western", "serif");
user_pref("font.size.fixed.x-western", 14);
) and then start firefox - it prints OK.
I must say I don't understand this at all - why would a trivial
preferences setting change in Firefox lead to completely different
postscript being produced and particularly when the postscript
differences seem to be unrelated to the preference that was changed -
the only connection I can see is that they're both related to fonts,
in general.
Very very odd, but hopefully someone from the xprint development team
will find this information useful.
Regards
Toby Blake
School of Informatics
University of Edinburgh
_______________________________________________
Xprint mailing list
[email protected]
http://mozdev.org/mailman/listinfo/xprint