Results 1 to 3 of 3

Thread: What happened to using a fixed width font when printing e-mails?

  1. #1
    Join Date
    Dec 2007
    Stockton, CA
    Rep Power

    Default What happened to using a fixed width font when printing e-mails?

    Hey all,

    Ever since we upgraded from 5.0.18 to 6.0.4 I've received several complaints about printing e-mails. With the 5.0.x version of Zimbra, the print version of an email was generated using a fixed width font (Courier or similar) which enabled plain text e-mails to retain their formatting.

    Now, in 6.0.4, the print version of a plain text e-mail seems to become HTML formatted (to enable the ability to change the font size, I assume) which totally destroys the formatting of plain text e-mails.

    Is there any way to fix this?


  2. #2
    Join Date
    Jun 2012
    Rep Power

    Default Print a message in fixed-width font. HACK/Work Around

    I imagine this is still a problem in 7.2.0 using webmail, but it is or almost the same problem in ZD 7.1.4

    We forward old green-bar reports for a UNIX system to our email as a text only formatted email. When viewing it in the ZD window it looks fine. (still fixed-width). However, as soon as you click the print icon, the new print preview window reverts to HTML and forces the font of the body.

    What should happen is that if, the message is in the format of "Text" as opposed to "HTML", then the preview window should also use a fixed-font. Of course this should be specified somewhere in preferences so you can specify a font size also.

    This work-around does the following:

    • Prompt the user EVERY time they select the print icon whether or not to print in HTML (Yes, this an inconvenience for normal printing, but minor for the ability to read your fixed-width reports on paper).
    • Modify the DOM on-the-fly to set the body of the message to "Courier New"

    You will, of course have to pick a font supported by your users system. I originally tried "Courier" but I got the gibberish other people have mentioned in other threads. The font "Fixedsys" may also work.

    The work-around can be addressed in the following file on Windows ( I am sure the path is similar for other OS's)

    C:\Program Files\Zimbra\Zimbra Desktop\jetty\webapps\zimbra\h\printmessage

    The bottom of the file reads...
    <script type="text/javascript">
    				 setTimeout('window.print()', 1000);
    Inserting the following lines above the line containing "setTimeOut"...
    <script type="text/javascript">
    				if(!confirm('Click OK to print as HTML or click Cancel to print as plain text.')){
    					e=document.getElementById('iframeBody');'Courier New';
    				 setTimeout('window.print()', 1000);

    I hope this isn't a no-no to post... but it works for me.

    I haven't actually tried this on my server, but on my local machine instance of ZD. The end result should be the same if you change the server file. Just be aware that the font name you pick must work for any client... so I suggest a comma delimited list of fixed-width fonts that would work on Windows/Linux/Mac as a default installed font. Maybe someone with this experience could post a list.

    If there is enough interest I could look into building a quick zimlet to allow for this if I can access the print message functionality, but it should be a fixed as a bug.

    Last edited by worraps; 06-27-2012 at 12:09 PM.

  3. #3
    Join Date
    Feb 2012
    Las Vegas
    Rep Power


    Actually, the standard, cross-platform way to force a monospace font is to simply specify "Monospace" as the font. The browser will automatically choose the system default monospaced font (on Windows, that may be Courier New; on Macs, it's either Monaco or Menlo, and in Linux, it could be just about anything but usually something Deja Sans Mono, Droid Sans Mono, Liberation Mono, Nimbus Mono L, Ubuntu Mono, etc.

Similar Threads

  1. Replies: 3
    Last Post: 05-25-2009, 09:05 AM
  2. Replies: 5
    Last Post: 06-18-2008, 01:50 AM
  3. "NO APPEND failed" message when migrating mails
    By in forum Administrators
    Replies: 8
    Last Post: 05-18-2007, 06:25 AM
  4. Confusion on Bugs Fixed in New Release
    By soxfan in forum Administrators
    Replies: 6
    Last Post: 03-30-2007, 01:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts