HylaFAX The world's most advanced open source fax server

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

Re: Postscript at 5% size in email attachment



The following may work for you:

#!/usr/bin/perl
#
# This file needs to be called:
# /usr/local/sbin/faxmail/application/postscript
# and have the +x bit set.
#
# Script to work with Hylafax's faxmail.
# It attempts to blow up attached postscript to full size on
# the next page, instead of shrinking it to 5% on page one 
# which is the default in faxmail.
#
# Your mileage will definitely vary.
# Seems to work with golfer.ps and tiger.ps in the 
# ghostscript/3.33/examples directory
#
# Ben Parker <ben@dha.unon.org> Dec 97 
#
#
open (TEMP, "$ARGV[0]") || die "$ARGV[0] file not found.\n";
print STDERR "$ARGV[0] opened ...\n";
while (<TEMP>) {
	if ($_ =~ "EndProlog") {
		print "\% line inserted to blow up size\n";
		print "showpage\n";
	}
	print $_;
}

# end of script

Let me know if it works!

Ben


On Tue, 16 Dec 1997, Ben Parker wrote:

> This is/will be documented in the new docs. The dumbest workaround is to
> attach the same .ps file twice to the same message, then it comes out once
> tiny and once full size on the next page but clobbers your tranmit time,
> presumably. In my limited experiments, I found that Postscript code varies
> so much, it is not possible to write a filter that inserts the "showpage"
> in the right place for every kind of ps file. 
> 
> Ben
> 
> 
> 
> 
> On Fri, 12 Dec 1997, Hugh Caley wrote:
> 
> > I couldn't get a message to this fellow, so I'm posting it on the
> > list...
> > 
> > Hugh
> > _______________________________________________________________
> > Glad to get some response!  OK, I am attaching a postscript file to my
> > mail
> > message.  When I open up doc139.ps (or whatever it is called), and go
> > down to
> > the end of the text of my message, it usually ends abruptly and the
> > Postscript
> > header for the attachment starts.  I insert it on the next line below
> > the last
> > line of the text of the message.
> > 
> > For instance, if I attache the 'tiger.ps' example file from the
> > ghostscript
> > distribution, I put the showpage just before :
> > 
> > %!PS-Adobe-2.0 EPSF-1.2
> > %%Creator: Adobe Illustrator(TM) 1.2d4
> > %%For: OpenWindows Version 2
> > %%Title: tiger.eps
> > %%CreationDate: 4/12/90 3:20 AM
> > %%DocumentProcSets: Adobe_Illustrator_1.2d1 0 0
> > %%DocumentSuppliedProcSets: Adobe_Illustrator_1.2d1 0 0
> > %%BoundingBox: 22 171 567 738
> > %%EndComments
> > 
> > Let me know what happens with you!
> > 
> > Hugh
> > 
> > Gernot Kerschbaumer wrote:
> > 
> > > > I am having this problem and I think I see what the problem is: a
> > > > "showpage" command should be inserted after the body of the text of
> > the
> > >
> > > where do you exactly insert this command? i couldn't repeat your fix.
> > >
> > > > If I take a ps file that has this problem and manually insert a
> > > > "showpage" before the second page commences it comes out right, with
> > the
> > >
> > > maybe, but where exactly? i tried it at several locations which seemed
> > to me
> > > the begin of the second page or the end of the body of text.
> > > i got no image at all after inserting 'showpage'.
> > >
> > > --
> > > gernot kerschbaumer
> > > student of computer science at the technical university of vienna,
> > austria
> > > email: e9018967@stud2.tuwien.ac.at
> > > homepage: http://stud2.tuwien.ac.at/~e9018967/
> > 
> > 
> > --
> > ______________________________________________
> > Hugh Caley - hcaley@tdl.com
> > "Brain-eating mutants are bad for business" - Battle Angel
> > 
> > 
> 




Project hosted by iFAX Solutions