![]() |
On Tue, 22 Jul 1997, David Woolley wrote: > Looking at the source code for faxmail.c++ (took about 5 minutes) it is > expecting: > > giftopnm $1 | pnmtops Great. That helps a lot. I had tried %1 but not $1! > It's running > > script GIF-file > > where GIF-file is a temporary file. Yes - now I can get some ps out the other end. Still need to work on it though.... > > 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. There is a message in the flexfax archives from someone who blames a scale command of 0.5 somewhere in the sendfax-generated PS and who could not find a way round it. This happens when you send a PS attachment through faxmail - which handles it without any user-created scripts interfering. Anyway, it's clear I need to do some PS homework to make the image stay on a whole page as you suggest, but it may turn out hard to control scaling whatever. Thanks very much for all these tips. Ben > 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 > >