HylaFAX The world's most advanced open source fax server

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

Re: postscript attachments show up at 5% size




Louis REINARD <lrei@ictlux.com> wrote:

>[snip some very clear and useful analytical work]
>Also, this explains why the "double attachments" described by
>Ben Parker work. The first attachment gets scaled down because
>of the reason descibed above. This first attachment supposedly
>ends with `showpage' and `end restore' which put the effect of
>`.05 dup scale' to an end, and then his second attachment gets
>faxed OK.
>
>I have manually moved those last five lines so that they precede
>the start `%!' of the converter-script output and then the fax
>just looks fine.
>
>As it appears to me, the problem is situated in faxmail or the
>TextFmt routines used by faxmail. Due to my lack of c/c++
>programming skills, I have not been able to hack the source
>to get this solved.
>

Good news. We seem to be on the trail of this common bug. My
thought that it was something to do with the faxmail prologue
file was obviously a complete miss.

Which is a bit of a shame, since I was hoping that if the solution
lay within the prologue file, then it would be easy to enhance
faxmail to provide an user defined header on the fax.

Can I give you an example ?

With a prologue file such as the following ( borrowed freely from
faxcover.ps ) :

%       $Id: faxmail.c++,v 1.56 1996/07/02 19:49:58 sam Exp sam
%
% faxmail prologue.
%
/inch {72 mul} def
/userheader {
gsave
  4.4 inch 10.2 inch moveto
  /Helvetica-BoldOblique findfont 23 scalefont setfont
  (Elgro Limited) show
  4.42 inch 9.95 inch moveto
  /Helvetica-Bold findfont 14 scalefont setfont
  (Boston, UK) show
grestore
} def

And then fiddling about with the faxmail generated postscript file to 
call the 'userheader' macro - after where the prologue file is inserted,
but *before* the infamous '0.5 dup scale' line : 

[snip, snip, start of ps file ]
                        <-----this is where prologue file is inserted
%%EndProlog
%%Page: "1" 1
userheader              <-----this is where user defined macro is called
save $printdict begin
.05 dup scale
[snip, snip, rest of ps file]

Then the result is a rather nice heading on the top right of the fax. So,
while someone is hacking faxmail or textfmt, could this facility be added
as well??

In my enthusiasm, I started looking through TextFmt.c++, but all I could
see was data structures, definitions and whatnot  -  couldn't find any
code that actually *did* anything. Clever stuff this c++, and well
beyond me.

Sorry for the long post,

Phil Watkinson,
Boston, UK.




Project hosted by iFAX Solutions