Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.3: Change the look and language of the fax cover page System
The design or the language of the fax cover page can be edited in the file /usr -> libexec -> fax -> coverpage.py; the file is written in Python. Back up the file and open it with Pico or another command line text editor:
$ cd /usr/libexec/fax
$ sudo cp coverpage.py coverpage.py_back
$ sudo pico -w coverpage.py
Edit the following lines to change the language:
subject_title = 'Subject'
from_title = 'From'
to_title = 'To'
date_title = 'Date'
pages_title = 'Sheets to follow'
The date format can be changed on line 95:
f = os.popen ('date')
to something like:
f = os.popen ('date "+%d.%m.%Y, %H:%M:%S"')
The Header is defined in the function make_header_html on line 83 as HTML. As an example, change the alignment of the cells or the text Format. Simple CSS Styles and even GIF or JPEG images can be used. Here's a small example:

return ('<html>\n'
 + '<head>\n'
 + '<meta http-equiv=Content-Type content="text/html; charset=UTF-8">'
 + '</head>\n'
 + '<body text="#000000" style="font-family:Helvetica;">\n
 + '<img src="file://path/to/company_logo.gif"><br>n<table>\n'
 + (to_name and make_row (to_title, to_name) or '')
 + (from_name and make_row (from_title, from_name) or '')
 + (date_string and make_row (date_title, date_string) or '')
 + (subject_text and make_row (subject_title, subject_text, 'b') or '')
 + (pages_string and make_row (pages_title, pages_string) or '')
 + '</table>\n</body>\n</html>')
Just look at the file an you will find some more interesting stuff. Someone who is familiar with python can change a lot more things than I describe here. Add Company Address, footer etc.
    •    
  • Currently 1.75 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[13,713 views]  

10.3: Change the look and language of the fax cover page | 4 comments | Create New Account
Click here to return to the '10.3: Change the look and language of the fax cover page' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Change the look and language of the fax cover page
Authored by: pcox on Nov 16, '03 06:33:58AM

Not knowing pico from pica this looks like a good idea for someone to make a neat little program for editing fax covers for idiots like me. Money waiting!



[ Reply to This | # ]
10.3: Change the look and language of the fax cover page
Authored by: earlshango on Jan 12, '04 05:14:59PM

This is a useful website:
http://www.18james.com/panther-fax.html



[ Reply to This | # ]
10.3: Change the look and language of the fax cover page
Authored by: kesmit on Nov 16, '03 10:55:19PM

Here is a modification of the coverpage application that allows you to write cover pages in HTML-formatted Zope Page Templates. It even allows users to create their own cover pages. Just download the file at the link below and follow the directions at the top.

http://www.themorgue.org/~kesmit/coverpage.py



[ Reply to This | # ]
10.3: Change the look and language of the fax cover page
Authored by: kesmit on Dec 21, '03 04:58:34PM
I've had to change web servers so the link above doesn't work now. Here is the new one: http://www.themorgue.org/src/coverpage.py.

[ Reply to This | # ]