SUMMARY: postscript document pagesize

From: Danny Lee (del@nabaus.com.au)
Date: Mon Aug 19 1996 - 02:17:35 CDT


Dear Sun-managers,
        Once again the sun-managers mailing list has come to the rescue. Needless to say, this is the best mailing list ever, ever, ever!!!

        I also neglected to mention in my original question that I've got one of those printers which is too clever for its own good because when I try to "just print" the files, all it prints is an error message saying "Can't select requested paper size for Frame print job!".

        Anyhow, the solution that I used for this problem came from Dougal Scott....many thanks. This solution involves editing the actual postscript file and changing the paper dimensions parameters, manually. It's OK if the file is small, however, I'll have to write a script to do this automatically for the larger files.

        Also, since then, Richard Skelton has also sent me a script to do this. However, I haven't tested it yet.

Thanks once again to all that replied.

Regards,
        Danny

ps. Hope this helps us poor folks in the parts of the world where the metric system is prevalent.

----- Original Question -----

Hi Sun-managers,

        I occassionally receive postscript documents over the 'net which have been generated by Frame Maker from our Sun contacts. These documents are usually generated for the "Letter" (8.5 x 11 inch) papersize. However, down here in the Land of Oz, the standard papersize is A4 (21 x 29.7 cm). So, does anyone know of the best way to either convert these documents to an A4 papersize so that I would be able to print them ? Alternatively, is there any Solaris application that would be able to help me out with this situation?

Thanks heaps for your help.

Danny

---

----- Replies -----

From: sweh@mpn.com (Stephen Harris) Subject: Re: postscript document pagesize To: del@nabaus.com.au Date: Mon, 19 Aug 1996 05:45:07 +0100 (BST) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit

Ugh, from memory there is an easy fix but I can't remember the solution!

Basically, when you print the document an error message appears on the page (something about Frame size...?). Look for that error message in the postscript code. Just before that _somewhere_ are two numbers that are used to perform the page size calculation. This is the page size assume 11x8.5inch. Simply perform scale calculations to convert this is 11.66x8.25 inches (ie multiple one number by 11.66/11 and the other by 8.25/8.5). Then the page should print.

Pretty vague huh? It _does_ work, but I can't find a document at present that has the problem...

rgds Stephen

***

From: Dougal Scott <dwagon@aaii.oz.au> Subject: Re: postscript document pagesize MIME-Version: 1.0 Date: Mon, 19 Aug 1996 15:54:15 +1000

I've had the same problem. If it occurs many times, you could probably write a script to do the following changes.

Every postscript page begins with: 612 792 0 FMBEGINPAGE ^ ^ These two are paper dimensions in points (72 points to the inch) A4 has dimensions 595 842 (approx, but good enough) so replace the above lines by 595 842 0 FMBEGINPAGE

Also there is one line per document like: 1 1 0 0 612 792 0 1 35 FMDOCUMENT ^ ^ ^ ^ ^ ^ ^ ^ ^ | | | | | | | | | | | | | | | | | +- Number of fonts | | | | | | | +--- Number of copies | | | | | | +----- Manual Feed? | | | | | +--------- Paper height | | | | +------------- Paper width | | | +--------------- Frame negative (haven't bothered to look see) | | +----------------- edow (likewise) | +------------------- yscale +--------------------- xscale

So again just change the 612,792.

Dougal Scott Australian Artificial Intelligence Institute dwagon@aaii.oz.au 6/171 La Trobe St. Melbourne 3000 Systems Support Australia Phone: +61 3 9663 7922 Fax: +61 3 9663 7937

***

From: rich@brake.demon.co.uk >Received: from yarrina.connect.com.au (yarrina.connect.com.au [192.189.54.17]) by perki0.connect.com.au with ESMTP id QAA03924 (8.7.5/IDA-1.6 for <del@nabaus.com.au>); Mon, 19 Aug 1996 16:12:38 +1000 (EST) Date: Mon, 19 Aug 1996 07:06:43 +0100 To: del@nabaus.com.au Subject: Re: postscript document pagesize

Hi Danny. I use fixfmps:- #!/usr/local/bin/perl eval 'exec perl -S $0 "$@"' if $running_under_some_shell;

# fixfmps: get conforming PostScript out of FrameMaker version 2 file # move all FMDEFINEFONTs to start of pages # # Copyright (C) Angus J. C. Duggan 1991-1995 # See file LICENSE for details. %fonts=();

while (<>) { if (/^([0-9]+) [0-9]+ .* FMDEFINEFONT$/) { $fonts{$1} = $_; } elsif (/^[0-9.]+ [0-9.]+ [0-9]+ FMBEGINPAGE$/) { print $_, join('',values(%fonts)); } elsif (m%(.*/PageSize \[paperwidth paperheight\]put )setpagedevice(.*)%) { print "$1pop$2\n"; } else { print $_; } }

Cheers Richard. Richard Skelton | e-mail : Richard.Skelton@brake.demon.co.uk WWW : http://www.brake.demon.co.uk/index.html WWW : http://www.netlink.co.uk/users/brake/

***

From: Mike Fletcher <fletch@ain.bls.com> X-Url: http://www.bwi.bls.com/~fletch/ X-Tmbg: The hip hop and the white funk just blew away my puppy's mind. Subject: Re: postscript document pagesize Mime-Version: 1.0 Date: Sun, 18 Aug 1996 23:23:47 -0400

I'm not absolutly sure, but I _think_ ghostview (the X11 front end for ghostscript) knows how to tell ghostscript to convert the output to the new size. Check out <URL:http://www.cs.wisc.edu/~ghost/>.

Again, I'm not sure but that'ld be a good place to start. Hope that helps.

--- Fletch __`'/| fletch@ain.bls.com "Lisa, in this house we obey the \ o.O' ______ 404 713-0414(w) Laws of Thermodynamics!" H. Simpson =(___)= -| Ack. | 404 315-7264(h) PGP Print: 8D8736A8FC59B2E6 8E675B341E378E43 U ------

***

Thanks also to: Glenn.Satchell@uniq.com.au (Glenn Satchell) Chris.Drake@Corp.Sun.COM (Chris Drake) --- Danny Lee Phone: (03) 9208 5812 National Australia Bank Fax: (03) 9208 5023 1/216 Victoria Parade, East Melbourne E-mail: del@nabaus.com.au Victoria, Australia 3002



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:08 CDT