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



Well, after a bit of fiddling, I found out the reason why the typerules rule for
html2ps was not being called.  It's always the simple things.

Apparently, the typerules file needs TABS between the "fields".  This makes
sense now that I think about it for a programmer's point of view, but
nonetheless, I never saw that indicated in any Hylafax documentation anywhere
(but perhaps I'm blind).  I cut-and-pasted the lines in the HylaFAQ directly to
the typerules file, which on my system converts tabs to spaces automatically.
This is why it was failing.

Once I replaced the spaces between the fields with tabs, things work dandy.

Now all I have to do is figure out why html2ps is not handling inline images.
It's putting an [IMAGE] in place of the real image in the generated .ps file.
*sigh*

==============================================================================
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)
==============================================================================

-----Original Message-----
From: Alan Sparks <asparks@cpd.harris.com>


>Normally I'd say it looks good...
>Given that html2ps will be executed by the fax (aka uucp) user, is html2ps
>executable by that user?  Can you run the command successfully as the fax
>user?

    Yes, html2ps ran fine from the command line...as the fax user or anyone
else.

>-----Original Message-----
>From: Lee Wilson <devnull@ad1440.net>
>
>>-----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).





Project hosted by iFAX Solutions