PostScript: A Digital Printing Press

The story of PostScript has many different facets. It is a story about profound changes in human literacy as well as a story of trade secrets within source code. It is a story about the importance of teams, and of geometry. And it is a story of the motivations and educations of engineer-entrepreneurs.

The Computer History Museum is excited to publicly release, for the first time, the source code for the breakthrough printing technology, PostScript. We thank Adobe, Inc. for their permission and support, and John Warnock for championing this release.

Access the code here.

1 Like

It’s wonderful to be able to look at the code behind things; especially something as prominent as PostScript.

It’s written in C with a style which reminds me of a lot of programs of that era. Some macro defines that implicitly state “This is a C program but I’d rather have used Pascal”:

#define endswitch default:;
#define until(x) while (!(x))
#define forward extern
#define private static
typedef float real;

Not as forcefully as some definitions I remember:

#define BEGIN {
#define END }

The use of octal constants seems more old-school C programmer.

#define MAXinteger 017777777777

The license is a bit restrictive as it doesn’t allow you to share it in any way. Still, I’d much rather have that then not getting to see it at all.


I understand the behavior, but never subscribed to it - why write in a particular language if you bring in artifacts from some other language you’re comfortable in? It just makes it harder for others familiar with the language to understand what’s going on.

Go hard or go home, as they say in these (and I suspect other) parts. :slight_smile:

That decision could cause practical problems in typesetting. You might think that coordinates around the size you’d see on a page would be safely inside the range of even a 32-bit float, and they absolutely are. But typesetting a line of characters involves adding up quite a lot of small floating-point character widths to see if you need to generate a line break.

If you’d created your own typesetting system that used PostScript to generate the page, very occasionally (I saw this once only) you’d get two different PostScript printers typesetting the same source document differently. Clever typesetting systems use only integer values to avoid this problem, and PDF - by not being a programming language - can never have this issue either.