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 is 640). yes, default. 640. that's the number. πŸ“
  • GRASS_RENDER_HEIGHT=yyy β€” the height of the image map (default is 480). πŸ“
  • GRASS_RENDER_TRUECOLOR=[TRUE|FALSE] β€” sets true-color support. Default is FALSE. so if you want the pretty colors you gotta say TRUE yourself. 🌈
  • 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 also GRASS_RENDER_WIDTH, GRASS_RENDER_HEIGHT. πŸ—’οΈ
  • GRASS_RENDER_PS_LANDSCAPE β€” if TRUE, 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 β€” if FALSE, 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 β€” if FALSE, 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