Updated: 21 May 2016
Table Of Contents


pbmtextps - render text into a PBM image using a postscript interpreter


pbmtextps [-font fontname] [-fontsize n] [-resolution n] [-stroke n] [-verbose] text


This program is part of Netpbm.

pbmtextps takes a single line of text from the command line and renders it into a PBM image. The image is of a single line of text; newline characters in the input have no effect.

The image is cropped at the top and the right. It is not cropped at the left or bottom so that the text begins at the same position relative to the origin. You can use pnmcrop to crop it all the way.

See pbmtext for a more sophisticated generator of text, but using less common font formats. pbmtext can generate multiple lines of text.

The -plain common option has no effect before Netpbm 10.42 (March 2008). The output is always raw PBM.



This specifies the font to use. fontname is the name of any valid postscript font which is installed on the system.

The default is TimesRoman.

Warning: if fontname does not name a valid font, pbmtextps just uses the default font. It does not tell you it is doing this.

This is the size of the font in points. See the -resolution option for information on how to interpret this size.

The default is 24 points.

This is the resolution in dots per inch of distance measurements pertaining to generation of the image. PBM images don't have any inherent resolution, so a distance such as "1 inch" doesn't mean anything unless you separately specify what resolution you're talking about. That's what this option does.

In particular, the meaning of the font size is determined by this resolution. If the font size is 24 points and the resolution is 150 dpi, then the font size is 50 pixels.

The default is 150 dpi.

This is the width of line to use for stroke font. There is no default stroke width because the characters are solid by default.
This option makes pbmtextps display extra information on Standard Error about its processing.


You can generate antialiased text by using a larger resolution than the default and scaling the image down using pamscale.

See the manual for the similar pbmtext for more advice on usage.


pbmtextps was added to Netpbm in Release 10.0 (June 2002).


pbmtext, pamcut, pnmcrop, pamcomp, ppmchange, pnmrotate, pamscale, ppmlabel, pbm


Copyright (C) 2002 by James McCann

Table Of Contents