Linux Commands Examples

A great documentation place for Linux commands


Format and print text for DeskJet 500 BubbleJet using ghostscript gslj - Format and print text for LaserJet printer using ghostscript

see also : gs


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]
[options] [files]
[options] [files]
[options] [files]
[options] [files]

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


gs .............. ghostscript
gsbj ............ ghostscript
gsdj ............ ghostscript
gsdj500 ......... ghostscript
gslj ............ ghostscript
groupmod _user_admin
groups _users
gs _gs
gsbj _pspdf
gsdj _pspdf
gsdj500 _pspdf
gslj _pspdf
gslp _pspdf
gsnd _pspdf
gtar _tar


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:


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


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


end-of-file/FF only starts a new column, not a new sheet

--spacing <n>

use double (n=2), triple (n=3), etc. spacing

Also, the string %# in a heading or footing is replaced with the page #.


This document was last revised for Ghostscript version 9.07.

see also



Artifex Software, Inc. are the primary maintainers of Ghostscript. This manpage by George Ferguson.

How can this site be more helpful to YOU ?

give  feedback