Hylafax Mailing List Archives

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

RE: Faxmail bug with attachments



On Friday, December 04, 1998 9:23 PM, Phil Watkinson [SMTP:pkw@elgro.co.uk]
wrote:
> At 10:29 02/12/98 +1000, "Campbell, Peter K" wrote:
> >[snip]
[...]
> and since the mailing list archives are down at the moment, I will
> put
> them on my own website over the weekend for your interest.
Ta muchly.

> Ben Parker,  
> Louis Reinard, and myself concluded that an additional 'showpage'
> instruction was required before a postscript attachment if on the
> first
> page of a fax.
> 
[...]
I just changed my giftops & jpegtops scripts to echo a showpage to stdout
before it did the conversion - it meant I had blank pages for 2nd+
attachments,
but that didn't concern me as much as losing the 1st attachment.

> The reasons for not incorporating this approach into faxmail.c++ and
> textfmt.c++ is, in my opinion (please put me right if you disagree):
> 
> 1. It is not legal postscript code. Ghostview thinks that there is 
>    only one page, but shows either page image at random.
Not legal?  Don't know why not; you should be able to put as many
showpages as you like.  The way I tested this out was with GhostView -
without the showpage, no 1st attachment, with the showpage, always
shows 1st attachment.  No randomness at all.  Mind you, my giftops &
jpegtops scripts automatically put a "showpage" in the stream *after* the
conversion (which fixes 2nd+, but not the first, attachment), so maybe
you're
having this problem with scripts that don't add the showpage?  The scripts
are
just compiled from the pnm/pbm & cjpeg/djpeg toolkits; maybe there's
clues in there?

> 2. The solution of forcing the attachment onto a new page is too
> crude;
>    what if the attachment is a page footer banner? Or what if there
>    is
>    no message body at all before the attachment?
Hadn't thought of the first possibility; in that case I'd say "oops" :-)  In
the
latter - well, wasted blank page.

> 3. It would still fail for unusual multi-part situations,
> particularly
>    where a text/plain attachment follows an application/postscript
>    attachment. 
Why?  Shouldn't it just have the text appear on a page after a blank
page?

> So a more flexible solution based on a wrapper around each attachment
> was being considered. Which is where in the story the mystery of the 
> faxmail prologue file, faxmail.ps, comes in. No-one knows what this
> file is for. The default file, shown below, has no effect whatsoever
> on the generated image :
> 
>    %       $Id: faxmail.c++,v 1.56 1996/07/02 19:49:58 sam Exp sam
>    %
>    % faxmail prologue.
>    %
>    /EPSbegin{save gsave 20 20 scale 200 dict begin}def
>    /EPSend{end grestore restore}def
I assumed that was the wrapper for the entire postscript file produced,
with all the images etc embedded within it.

> If you have some expertise in the Postscript language, and happy to 
> delve into the faxmail and textfmt C++ source code, then your help
> and
> input would be very much appreciated.

Nope, I have absolutely no expertise in Postscript (and no wish to learn
;-).
I know about the showpage trick because I've come across it before when
some other program wasn't creating correct output & I found it when scanning
through the postscript file, & I've managed to hack the image on the initial
page (although that was a while ago, not sure what I did).  Any chance of
contacting the original author?  It's amazing how many people I've come
across
that know enough to hack postscript like me, but I've yet to find someone
who
can truly say they have expertise in Postscript.  Bit frightening, really.

Anyway, have a good Christmas.

Peter K. Campbell



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