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...
Code:
<script type="text/javascript">
<!--
setTimeout('window.print()', 1000);
//-->
</script>
</body>
</html> Inserting the following lines above the line containing "setTimeOut"...
Code:
<script type="text/javascript">
<!--
if(!confirm('Click OK to print as HTML or click Cancel to print as plain text.')){
e=document.getElementById('iframeBody');
e.style.fontFamily='Courier New';
}
setTimeout('window.print()', 1000);
//-->
</script>
</body>
</html>
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.
Todd