gslp - Format and print text using ghostscript
gsbj - Format and print text for BubbleJet printer using ghostscript
gsdj - Format and print text for DeskJet printer using ghostscript
gsdj500 - Format and print text for DeskJet 500 BubbleJet using ghostscript
gslj - Format and print text for LaserJet printer using ghostscript
| Use Case | Command | Description |
|---|---|---|
| Print a text file to default (epson) | gslp file.txt | Outputs to epson device at 180 dpi |
| Print to DeskJet | gsdj file.txt | Uses deskjet device at 300 dpi |
| Print to LaserJet | gslj file.txt | Uses laserjet device at 300 dpi |
| Double spacing | gslp --spacing 2 file.txt | Adds blank line between text lines |
| Twoβcolumn output | gslp --columns 2 file.txt | Prints in two columns |
| Set margins | gslp --margin-top 1in --margin-left 1.5in file.txt | Defines top and left margins |
| Add pageβnumber header | gslp -B --heading-center "Page %#" file.txt | %# is replaced by page number |
| Kerning with AFM file | gslp --kern font.afm file.txt | Adjusts character spacing |
| Start at page 5 | gslp --first-page 5 file.txt | Skips pages 1β4 |
| Adjust space width | gslp --add-to-space 2 file.txt | Adds 2/72β³ to each space |
gslp -12BclqRr -b<header> -f<font> -F<hfont> -L<lines> -p<outfile> -T<n>
--add-to-space <units> --add-to-width <units> --columns <n> --detect --first-page <n>
--kern <file.afm> --last-page <n> --(heading|footing)-(left|center|right) <string> --margin-(top|bottom|left|right) <inches>
--no-eject-(file|formfeed) --spacing <n> [gs options] [files]
gsbj [options] [files]
gsdj [options] [files]
gsdj500 [options] [files]
gslj [options] [files]
This utility provides functionality approximately equivalent to the Unix enscript(1) program. It prints plain text files using a single font. It currently handles tabs and formfeeds, but not backspaces. It will line-wrap when using fixed-pitch fonts. It will also do kerning and width adjustment.
The default device (-sDEVICE=) and resolution (-r) are as follows:
gslp epson 180
gsbj bj10e 180
gsdj deskjet 300
gsdj500 djet500 300
gslj laserjet 300
By default the current date is formatted as the center header.
Standard switches implemented:
-12BclqRr -b<header> -f<font> -F<hfont> -L<lines> -p<outfile>
Sun switches implemented:
-T<n> β set tab width
Switches ignored:
-GghKkmow -# -C -d -J -n -P -S -s -t -v
Switches added:
--add-to-space <units> β add the given number of 1/72β³ units to the width of each space (may be negative)--add-to-width <units> β add the given number of 1/72β³ units to the width of each character (may be negative)--columns <n> β print in <n> columns--detect β treat the file as PostScript if it starts with %!--first-page <n> β start printing at page <n>--kern <file.afm> β kern using information from the given .AFM file--last-page <n> β stop printing after page <n>--(heading|footing)-(left|center|right) <string> β set the heading/footing fields; use -B first to clear--margin-(top|bottom|left|right) <inches> β set a margin--no-eject-(file|formfeed) β end-of-file/FF only starts a new column, not a new sheet--spacing <n> β use double (n=2), triple (n=3), etc. spacingAlso, the string %# in a heading or footing is replaced with the page number.
This document was last revised for Ghostscript version 9.55.0.
Artifex Software, Inc. are the primary maintainers of Ghostscript. This manpage by George Ferguson.
Generated by phpman v4.9.29 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-21 05:56 @2600:1f28:365:80b0:e9a9:ac35:f5fe:ea62
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format