Hylafax Mailing List Archives

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

Re: faxmail :attachment file ?



> On Mon, 21 Jul 1997, Ben Parker wrote:
> 
> Just in case anyone has a clue, a script for image/gif:
> 
> giftopnm | pnmtops

Looking at the source code for faxmail.c++ (took about 5 minutes) it is
expecting:

giftopnm $1 | pnmtops

> does *not* work. It's not clear from the faxmail man page how these
> scripts should be structured i.e as though it were receiving
> 
> script <GIF file

It's running

  script GIF-file

where GIF-file is a temporary file.

> or where you get the input to the utility for processing.
> 
> The output should be tagged on to the covering message as PS if sucessful.
> This issue would not be very significant but for the fact that sending PS
> through faxmail doesn't work either as the graphic get squashed into the a
> tiny bottom left corner by faxmail and sendfax. 
> 

At a guess you are forgetting that postscript images are conventionally
output scaled to a unit square, at postscript coordinates 0,0, and
a transformation is then applied to get them to the desired size.
Unfortunately I don't have the pbm libraries installed on my home machine,
so I can't check what the man page says.  However, if I am right, the
problem is, as much as anything in the pnmtops routine, and you will need
to wrap the image in postscript to scale to the desired output size then
restore the transformation.  The default unit is 1/72nd of an inch and
the default origin is bottom left.


In this case, you will need to output:

  gsave width-in-points height-in-points scale

before the image and:

  grestore

after it, unless the pnm tools provide an easier approach.  (I haven't
test run the above.)

Incidentally, the man page warns against mixing text and formatted material,
and looking at the code, I would go further and say that any pre-prepared 
postscript should consist of complete pages, and you should output
a postscript page around any custom convertor (postscript is normally set
in page relative coordinates, not relative to the previous material on the
page, and, in any case, will not automatically split material across page
boundaries).  I think a basic page is:   save ......restore showpage



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services