On 21-Oct-01 Steven T. Hatton wrote:
I am once again frustrated with printing. It seems as if something has gone wrong with the paper size or margin settings related to ghostscript. I believe the problem is related to the postscript files I create locally as opposed to those I download from, for example, www.w3c.org. If I do something such as 'enscript rfc3104.txt -o rfc3104.ps;gv rfc3104.ps &' I see that the created postscript file has a very small left margin.
I've discovered that most of the default setting on my box are for A4 paper size. I'm in the US and for reasons beyond my control I am forced to conform to standards which are inconsistent with the rest of the world. Nonetheless, I would like to be able to print without having to read (or write) a thesis paper on postscript. the files I've discovered with a default A4 papersize are:
/etc/a2ps-site.cfg /etc/enscript.cfg /usr/share/ghostscript/6.51/lib/gs_init.ps
changing the papersize to Letterdj or letter in these does not seem to fix the problem. I can't seem to identify the configuration setting to correct this problem. Does anybody know what the problem is, or how I can fix it?
1. Once a PS file has been formatted for a particular papersize,
that's it. The best you can subsequently do for a different papersize
is to scale the dimensions of the whole thing so that it fits,
but then the point size of the print will change. But you're stuck
with that if you got the PS file from somewhere else, that created
it for A4.
To rescale it, use "psresize". This has quite a few options which
you may want to look at (see "man psresize"), but if you have
an A4 PS file and want to get it onto Letter paper, the command
psresize -PA4 -pletter in.ps out.ps
should do the basic business.
2. If you're using "enscript" to make your own PS files out of
text files, you can at least use the -M ("media") option
as in
enscript -M Letter in.txt out.ps
(There's also a "Letterdj" media option which will print
about 1/5 inch further to the left than "Letter", and 1/5
inch further to the right, i.e. a slightly wider printing
area; and also stop printing 2/9 inch further from the
bottom of the paper than "Letter"; but both start at the
same distance from the top.)
There are an awful lot of options for "enscript" (see "man
enscript") and sussing out how to make a good config file
for it is not easy. The default is A4: my enscript config
file is /etc/enscript.cfg and it has the lines
# Default output media.
DefaultMedia: A4
Changing this to
DefaultMedia: Letter
_should_ fix it, but in any case the "-M Letter" option
should over-ride it. Further down the enscript.cfg file
(around line 87) starts a list of Media Definitions:
# Media definitions:
# name width height llx lly urx ury
Media: A3 842 1190 24 24 818 1166
Media: A4 595 842 24 24 571 818
Media: A5 420 595 24 24 396 571
Media: Legal 612 1008 24 24 588 984
Media: Letter 612 792 38 24 574 768
# HP DeskJet media (DeskJet can't print on the bottom 1/2" of the paper).
Media: A4dj 595 842 24 50 571 818
Media: Letterdj 612 792 24 40 588 768
These are given in "points" (1 point = 1/72 inch), and the
llx, lly, urx, ury are the coordinates, in points, of the
lower-left and upper-right corners of the printing area.
Check that you have these, and that they agree with the above.
3. Mads Joergensen's GROFF_PAGESIZE suggestion has nothing
to do with it unless you're using groff to create PS files
(which by the way is a good idea if you're doing fancy
layouts and formatting, though some prefer TeX ... );
this ONLY affects the papersize used by groff and has
nothing whatever to do with any other PS-generating software.
4. In your example
enscript -B -j -MLetter rfc3104.txt -o rfc3104.ps
psbook rfc3104.ps | psnup -2 -pletter -m.5cm -d > book.ps
gv book.ps
I do not find that the outer left-hand (i.e. at the bottom
of the paper) prints 'squished' at all (though mine is a
PostScript printer, and this may occur during the printer-
driver conversion from PS to deskJet), However, it is very
close indeed to the bottom-limit for DeskJets, and might
even get truncated. It will certainly get truncated if you
make the margin any narrower.
"psnup" is, I have found, very tricky to get just right where
placement on the page and margins are concerned. It has a bit
of a mind of its own about exactly where to place things.
I don't think what you're seeing has anything to do with default
paper sizes; using command-line options to force it should
sort that out, and in order to tweak it you'll need to fiddle
with margins etc. until it's as you want it.
I hope this helps,
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding)