psdriver(1)
π psdriver(1) π
okay bestie, welcome to the GRASS GIS User's Manual entry for psdriver(1) β the PostScript DISPLAY DRIVER. grab a strawberry π and let's get into it.
β¨ PostScript DISPLAY DRIVER β¨
PS display driver to create PostScript files. that's the whole vibe. it's giving "turn my map into a .ps file." π
πΈ DESCRIPTION πΈ
The PS driver generates a PostScript file from GRASS display commands. literally that's it, that's the job β you run your display commands, it hands you a PostScript file. iconic behavior, no cap. π
π¦ USAGE π¦
π§ Environment variables π§
The PS driver can be enabled by setting the GRASS_RENDER_IMMEDIATE variable, eg.
export GRASS_RENDER_IMMEDIATE=ps
Several environment variables affect the operation of the PS driver β here's the whole lineup, bestie, don't skip a single one:
GRASS_RENDER_WIDTH=xxxβ the width of the image map (default is640). yes, default. 640. that's the number. πGRASS_RENDER_HEIGHT=yyyβ the height of the image map (default is480). πGRASS_RENDER_TRUECOLOR=[TRUE|FALSE]β sets true-color support. Default isFALSE. so if you want the pretty colors you gotta sayTRUEyourself. πGRASS_RENDER_FILEβ name of output file. If it ends with".eps"an EPS file will be created. so the extension lowkey decides your whole destiny here. πGRASS_RENDER_PS_PAPERβ sets the screen dimensions and margins to fit a standard paper size, see alsoGRASS_RENDER_WIDTH,GRASS_RENDER_HEIGHT. ποΈGRASS_RENDER_PS_LANDSCAPEβ ifTRUE, the screen is rotated 90 degrees counter-clockwise so that a "landscape" screen fits better on "portrait" paper. rotating the whole vibe, periodt. πGRASS_RENDER_PS_HEADERβ ifFALSE, the output is appended to any existing file, and no prolog or setup sections are generated. (so it just yeets itself onto the end of what's already there π)GRASS_RENDER_PS_TRAILERβ ifFALSE, no trailer section is generated.
π Example π
export GRASS_RENDER_IMMEDIATE=ps
export GRASS_RENDER_TRUECOLOR=TRUE
g.region raster=elevation
d.rast elevation
d.vect roadsmajor color=red
This writes a file named map.ps in your current directory. boom. you did that. π
π₯ NOTES π₯
The resolution of the output files is defined by current region extents. Use g.region -p to get the number of rows and cols and use the environment variables to set the image size. If you would like a larger image, multiply both rows and cols by the same whole number to preserve the aspect ratio β same number for both, bestie, don't be chaotic about it, the aspect ratio will literally betray you. π
GRASS_RENDER_TRUECOLOR requires either PostScript level 2 or level 1 plus the colorimage and setrgbcolor operators (this is the case for colour printers which pre-date level 2 PostScript).
β οΈ Masked images (d.rast,d.rgb,d.his -n) require PostScript level 3. no level 3, no masked images. that's the rule and I don't make them. π
π SEE ALSO π
- Cairo driver, PNG driver, HTML driver, variables
d.rast,d.vect,d.mon,d.erase,d.redraw
π AUTHOR π
Glynn Clements, 2007. respect. π«Ά
π SOURCE CODE π
Available at: PostScript DISPLAY DRIVER source code (history)
Accessed: Saturday Jan 17 05:39:55 2026
Main index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
okay that's the whole page, mwah π this was GRASS 8.4.2 talking about psdriver(1), so if you see that number floating around at the bottom of your terminal, that's us. go make some PostScript files, you absolute main character. β¨π¦πΈ
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms