Printing from Mozilla Thunderbird through Xprint

I finally managed to print emails decently from Mozilla Thunderbird with the Xprint backend. Until now it has always come out too big, too small, in the wrong fonts or something else. It has never printed anything presentable.
The necessary instruction on how to make it work are here.
First of all, remove the copies of the PostScript fonts that Xprint keeps for itself. On my Debian systems they’re found at /usr/share/Xprint/xserver/C/print/models/PSdefault/fonts. Just remove the directory. It has to be done as root.
Then go to your Mozilla Thunderbird preferences directory. It’ll be something like ~/.mozilla-thunderbird/default.XXX/ where the last three ‘X’ are individual. There ought to be a chrome sub-folder here, and in that you’ll have to place a file called userContent.css. Just edit it with any editor of your choice. Create it if it doesn’t exist. It has to contain this text:

@media print {
   body, table {
       color: black;
       font-family: 'Times New Roman', times, serif;
       font-size: 12pt;
   tt, pre {
       font-family: 'Courier New', courier, typewriter, monospace;
   :link, :visited {
       color: black !important;
       text-decoration: underline !important;
   .moz-text-plain {
       font-family: 'Courier New',courier,monospace !important;

It might seem like black magic if you’re not accustomed to Cascading Style Sheets, but it tells Mozilla Thunderbird what fonts and sizes to use for printing.
Last thing is to exit Mozilla Thunderbird and restart it to get the style sheet to take effect.


Leave a Reply

Your email address will not be published. Required fields are marked *