Viewing Faxes on the Web
-
Introduction
- Setting up Apache 2.0
- Suggestions for you
- Conclusion
- References
Introduction
The purpose of this article is to describe a simple Perl script I use
to manage faxes on my fax server over the web. The method I use is very
crude and is only used by myself and one other person in the company
I work for,
but it works for me. With very little effort, it would be very easy to
setup professional scripts to handle faxes from small to very large
corporations. I also believe it would be very easy to setup a web interface
for other fax systems (if they don't already have it). Personally, I would
much rather send and receive faxes over a webpage because then I can access
the system (and the faxes) from anywhere in the world.
For my setup, I was using efax, which is not that easy to get along with.
For any sane person, I recommend
HylaFax or some other alternative
(mgetty has some hope).
Please read my other efax article at
Linux
Focus.
Configuring Apache 2.0
First, look at how I
compiled and then
configured Apache 2.0. This is just one installation I did, out of many.
No, Php is not running on my webserver even though the config file says I am.
I have a directory, /usr/local/apache2/htdocs/fax, where I put in my
Perl script and .htaccess files.
Underneath this directory, I have these directories:
- home -- my faxes go here
- ab -- where other Audioboomerang faxes go.
- source -- where we have the original faxes at.
- display -- the list of faxes yet to be viewed/archived.
- archives -- where the ps and pdf files are archived.
I put a .htaccess in these directories to limit access by people. An example
.htaccess is
AuthName Test
AuthType Basic
AuthUserFile /usr/local/apache2/passwords/Passwords
order deny,allow
require user mark ted
You can change/add passwords with htpasswd.
Next, the last thing is to create a perl script.
Here is my very crude Perl script. If I ever do anything else with it,
I will convert it to a Python script first as Python is the next wave
for programming (I hope). Python, Zope, Apache, Linux, and PostgreSQL
are the top choices for my programming environment. Save it as "fax.pl"
and perform a "chmod 755 fax.pl" after saving it.
You can download it or just view it below.
Suggestions for you.
- I normally write in Python 2.2 these days, as this should be rewritten
in. I just happened to use Perl because I was testing mod_perl and
Apache 2.0.
- Write a Python script to let people upload PostScript, images, or other
file formats that Linux can convert to tiff to send out as faxes. In addition,
the Python script should receive the telephone number, cover letter, etc.
to make the system flexible.
- Create a Python/TK or wxPython
script which acts as a client program to send and recieve faxes from your
Apache 2.0 server. The trick here is that people might have to create
a postscript file first to upload faxes or better yet, figure out some way
to directly print to the Python Script.
- When you have a multiple page fax, have the Perl/Python
script on the webserver detect and order
the pages and merge them into one ps file with psmerge or other tool.
- Faxes can be pretty sensitive so use the secure service in Apache 2.0
for viewing or sending your faxes.
Conclusion
I think it is pretty cool, and my boss thinks it is pretty cool.
I am going to switch to a different fax service because efax is hard to deal
with when sending faxes. My next goal is to make it so I can send faxes
through a webpage. I will have to set it up so that you first print your
document to a postscript file and then upload it (or upload a graphic image
or something else that Linux can convert usign a standard tool).
I am not sure what other fax setups utilize the web, but from my perspective,
I always want to have access to my faxes over the web or to send a fax
over the web.
References
-
If this article
changes, it will be available here
http://www.tcu-inc.com/Articles/31/nielsen.html
Mark Nielsen works at
AudioBoomerang.com
which creates, delivers, and tracks personalized multimedia email, web,
and newsletter campaigns. He works as a consultant delivering end products
to AudioBoomerang.com clients, such as advanced customized statistical
reports used for demographic or pyschological profiles for future campaigns.
In his spare time, he writes articles relating to Free Software (GPL) or
Free Literature (FDL) and is involved with the non-profit learning center
eastmont.net.
Copyright © 11/2002 Mark Nielsen
Article