[GRASSLIST:3571] Re: (ps.map) how to print map?
Glynn Clements
glynn.clements at virgin.net
Tue Apr 23 07:17:46 EDT 2002
Valentin Podlovchenko wrote:
> when I print map to postscript file with ps.map, Grass always changes
> scale
> to fit on a4 paper size even when I say larger scale. Although if I
> give small scale, map created with ps.map has correct scale.
>
> How to print larger map (at given scale)?
Select a larger device with e.g. "ps.select a0".
> And may someone advise me how
> to print large postscript document on multiple sheets of paper on linux.
I'm not aware of any program which does this. However, you can
manually add "translate" statements to the PostScript file
(immediately after the "%%EndProlog" line), to change the portion of
the document which is printed. E.g.
%%EndProlog
ADD>> -560 -841.68 translate
gsave 19.0 751.9 1135.9 1574.4 B clip newpath
To get this to work correctly you would need to define a custom
"device" (i.e. paper size), in $GISBASE/etc/paint/ps.devices. The
margins would be the same as those of the printer, and the
width/height would be equal to the margins plus a multiple of the
imageable area (the width/height minus the margins). The individual
pages would need to be translated by multiples of the imageable area.
E.g. the parameters for A4 are (in inches):
level: 2
page width: 8.27
page height: 11.69
top margin: 0.5
bottom margin: 0.5
left margin: 0.25
right margin: 0.25
resolution: 300
This provides an imageable area of:
width: 8.27 - 0.25 - 0.25 = 7.77
height: 11.69 - 0.5 - 0.5 = 10.69
The 2x2 grid would have an imageable are of:
width: 7.77 * 2 = 15.54
height: 10.69 * 2 = 21.38
Adding back the margins gives:
width: 15.54 + 0.25 + 0.25 = 16.04
height: 21.38 + 0.5 + 0.5 = 22.38
So you would create a new device as:
level: 2
page width: 16.04
page height: 22.38
top margin: 0.5
bottom margin: 0.5
left margin: 0.25
right margin: 0.25
resolution: 300
The translation is by multiples (in this case 0 or 1) of the imageable
area of a single page, given in points (1/72 inch), which is:
width: 7.77 * 72 = 559.44
height: 10.69 * 72 = 769.68
So, each of the four pages would have one of the following lines
inserted after the "%%EndProlog" line:
0 0 translate
0 -769.68 translate
-559.44 0 translate
-559.44 -769.68 translate
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-user
mailing list