psfile in ps.map

Malcolm Williamson malcolm at cast.uark.edu
Wed Mar 15 11:16:10 EST 1995


t?Mar?15??95?12?14?49?pm at bnr.ca>
Reply-To: grassu-list at max.cecer.army.mil
NNTP-Posting-Host: ux1.cso.uiuc.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Originator: daemon at ux1.cso.uiuc.edu


> 
> Hi,
> Who knows who you can position a postscript file included in your with ps.map
> script with psfile.
> My included logo postscript file is somewhere put at the top of my raster
> file defined in ps.map (the command where does not work in combination
> with psfile).
> 
> Thanks,
> Okke
> 
> VVVVVVVVVVVVVVVVVVVVVVUUUUUUUUUUUUUUUUUUUUUUUUBBBBBBBBBBBBBBBBBBBBBBBBBBBB
> Okke Batelaan                              email: batelaan at hydr1.vub.ac.be
> Laboratory of Hydrology                    NEW !! tel:   x-32-2-6293021
> Free University Brussels                   NEW !! fax:   x-32-2-6293022
> Pleinlaan 2
> 1050 BRUSSELS, BELGIUM
> HHHHHHHHHHYYYYYYYYYYDDDDDDDDDRRRRRRROOOOOOOOOLLLLLLLLLOOOOOOOOOGGGGGYYYYYY
> 
Hello, Okke
Ah, the wonders of PostScript! This may or may not be fairly easy. Search for
the word "translate" in your PostScript file; hopefully you will find a line
that looks something like
        3960 601 translate
or
        5.0 inch 8.35 inch translate

These two lines actually are saying the same thing: move so many units in the
x direction and so many units in the y direction. The default units in 
PostScript are "points"; there are 72 points per inch. The first line above is
in points, and the second one is in inches; they both designate the same 
distance. In order to use the inch units, they must be defined in a line prior
to the translate command:
        /inch {72 mul} def
Otherwise you are stuck using points. I almost forgot: these dimensions are
from the lower left corner of the PostScript page. So, to move your logo,
simply alter the values for the translate command.

If you have no translate command already in your file, putting it in the
correct place may be a little tricky. I would suggest searching for the first
"gsave" command, and adding the translate line immediately after it.

If you really want to understand PostScript, there is an Adobe PostScript
Reference Manual, published by Addison-Wesley, I believe. An invaluable tool!

Good luck, and let me know if I can be of further help.
-- 
Malcolm D. Williamson - GIS Specialist           E-mail: malcolm at cast.uark.edu
Center for Advanced Spatial Technologies      Telephone: (501) 575-6159
Ozark Rm. 12                                        Fax: (501) 575-5218 
University of Arkansas              
Fayetteville, AR 72701




More information about the grass-user mailing list