Hylafax Mailing List Archives

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

Re: faxmail :attachment file ?




This is what I now use for GIF. Haven't had time to try any other formats
yet (JPEG would be nice). Two scripts. The second, the perl script, hacks
the output to make it fit on one separate page almost full size (18/20). 

#/usr/local/sbin/faxmail/image/gif
#!/bin/bash
giftopnm -v $1 | ppmtopgm | pnmtops -rle -nocenter | /usr/local/sbin/faxmail/image/pnmpsfix.pl

#/usr/local/sbin/faxmail/image/pnmpsfix.pl
#!/usr/bin/perl
while (<STDIN>) {
	if ($_ =~ "scale") {
		($x,$y,$junk) = split(/\s/);
		$newx = $x * 18;
		$newy = $y * 18;
		print "showpage\n";
		print "15 25 translate\n";
	}
	print $_;
}



Good luck,

Ben


On Mon, 29 Sep 1997, Salih Tilkici wrote:

> Hi,
> 
> I am working on faxmail mime converter script. I'm trying to convert tiff
> to ps. I know that my converter script is working. Because I'm redirecting
> a copy to another file and it seems ok. 
> 
> But when I try to display the doc file only From and subject displayed.
> The attachment parts are displayed as blank. When I look at the source of
> docq file, I can see the converted tiff part in postscript format. I think
> it is merging two postscript files in wrong format.
> 
> How can solve this problem. Can anyone send an example (working;) 
> converter script. I'm using a script like this: 
> ===========================================================
> #!/bin/sh
>    file=$1
>    TMP=/tmp/debugfile
> #This is for faxmail
>    convert tiff:$file ps:-
> #this is for testing
>    convert tiff:$file ps:$TMP
> ===========================================================
> 
> Regards,
> 
> Salih Tilkici
> 
> PS: I'm using ImageMagick's convert program.
> 
> On Wed, 23 Jul 1997, Ben Parker wrote:
> 
> > 
> > 
> > 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....
> 
> 



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