HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Faxing HTML files



-----Original Message-----
From: Phil Watkinson <Pkwatkinson@tesco.net>


>You wrote:
>> I am trying to get HTML files to fax as html rather than html-code.
>Looking in
>> the HylaFAQ, I am told to install html2ps and add some lines to my
>> /usr/share/fax/typerules file.
>>
>> All well and good, and everything is installed as far as I can tell.
>However,
>> when using the sendfax command, it still sends the html as html-code.
>Yes, I
>> restarted the hfaxd.  =)
>>[snip]
>
>No need to restart anything, the typerules file is reread everytime you
>submit
>a fax to sendfax.
>
>Two things to try.
>
>1. Check that your html2ps is installed properly and you are calling it
>correctly
>   by running it on the command line.
>
>2. The beginning of html files can vary a lot; have a look at the first line
>in your
>   test html file and ensure that the rules you have added to typerules will
>match.



ok, well good to know that typerules is read every time.  Here's the lines I
added to my typerules (cut & pasted directly to catch typos, if any):

## HTML support
0    string    <!DOCTYPE HTML    ps    /usr/bin/html2ps %i >%o
0    string    <!doctype html    ps    /usr/bin/html2ps %i >%o
0    string    <HEAD             ps    /usr/bin/html2ps %i >%o
0    string    <head             ps    /usr/bin/html2ps %i >%o
0    string    <TITLE            ps    /usr/bin/html2ps %i >%o
0    string    <title            ps    /usr/bin/html2ps %i >%o
0    string    <HTML             ps    /usr/bin/html2ps %i >%o
0    string    <html             ps    /usr/bin/html2ps %i >%o

This is exactly as specified in the HylaFAQ, except that I changed
/usr/local/bin/html2ps to be /usr/bin/html2ps which is where we have it
installed.

The html file I am sending is a very simple test case:
<HTML>
<BODY>
<B>This</B> is a test fax with an embedded image.
<IMG src="/images/qmlogo.gif">
</BODY>
</HTML>

This, as far as I can tell, should be caught by the typerules and put through
html2ps.  I have tried "html2ps testfax.php" via command line and it works fine
(outputting a correct .ps file).

==============================================================================
devnull@ad1440.net          S/W Developer       http://www.ad1440.net/~devnull
==============================================================================
        Linux Viruscan:  Windows 95/98/NT Found Remove it ? (Y/y)
==============================================================================
GCS/IT@ d? s+:++>: a29 C++++$ ULS++++$ P++ L++>+++ E W+++ N+ o? K- w O- M- V--
PS+ PE Y+ PGP+ t+@ 5++ X+ R++ tv--@ b+++ DI++ D G e++ h----@(++) r+++() y++++*
                  (http://www.ebb.org/ungeek to decode)
==============================================================================





Project hosted by iFAX Solutions