Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got two problems printing out program listings on web pages from Sun's website, using Firefox in Windows, and was wondering how I might diagnose/correct the problem.

Here's an example page. The regular text prints fine but the fixed-width font is very problematic; it looks fine on screen but in a print out the characters are all jumbled like the kerning has gone horribly awry... and I also have the "Mah Jong" effect: instead of whitespace characters at the beginning of the line, I see a bunch of square characters with what looks like


inside, which I guess is the printer driver's way of complaining that this is a unicode character that it doesn't know how to print. (why it doesn't know how to print out a space is beyond me....)

Any suggestions?

share|improve this question
Have you come across this problem on any other sites? I get the same problem with FF but the Sun page prints fine from Chrome. – pelms Aug 5 '09 at 14:35
up vote 1 down vote accepted

It appears to be a bug with the way Firefox handles Courier as opposed to Courier New.

Try printing the page above and see if there's a difference for you. IE and Chrome print this just fine. Opera circumvented this by substituting another font, albeit variable width. The link above has a Greasemonkey script as a workaround.

share|improve this answer
Thanks!!! This appears to be the issue -- Courier New works fine, but Courier doesn't. I'll have to try the Greasemonkey script. – Jason S Aug 5 '09 at 21:48

Usually when I run into these kinds of printing issues, I'll try first printing to PDF and then printing the PDF file. Have you tried this?

Sounds like this issue has cropped up before with Mozilla. Their recommendation to change the monospace font used by default (Tools > Options > Content > Fonts & Colors > Advanced), or update the printer driver.

share|improve this answer
yes. PDF has the fixed font's kerning still messed up, but the spaces are OK. Still, the point is that there's something wrong with the way my system is set up. I don't mind printing to PDF once in a while, but I want to fix this issue. – Jason S Aug 5 '09 at 14:10
Alternatively use another browser for printing. – Joey Aug 5 '09 at 19:50

First thing first. Make sure you have the right fonts installed. You cannot print fonts you do not have installed on your system.

The next thing I would verify is that you have the correct printer driver installed. Many printers can print in a basic ascii mode or they can print in the native driver mode. The printer cannot print graphics and intricate detail unless it is in the native driver mode for the device.

So if you have the fonts installed and you have the right drivers loaded you should be able to get it working correctly.

share|improve this answer
Hmmm... I see your point, in principle, but I don't see any way of knowing whether I have the right fonts installed or the right printer drivers loaded. – Jason S Aug 5 '09 at 21:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .