About 15 years ago, I picked up the two "Official" books on the subject published by Adobe. I think they are now called the "Red" and "Green" books.
A lot of the focus was on the more advanced functionality such as vector graphics, bitmaps and scaling.
After exploring the basics I came to the following summary which is 99% of what you need to use it for reports and basic text.
If you can understand the following snippet... you can do almost everything.
Code:
/Helvetica-Oblique findfont 10 scalefont setfont
72 720 moveto (Hello World) show
showpage
In a nutshell:
1. Set a font. If the entire page is one font, you only set it once.
2. Position the next output by using two numbers, followed by the command moveto.
3. Place the text you want to print in parenthesis and write the word "show".
4. When you're done placing text, use the command "showpage".
Other than that, some additional information to know:
PostScript is a stack based language. As such commands are executed in reverse notation. In plain English, that means you send it data, it keeps placing it on a stack until the command comes that tells it do do something with it.
Case in point, graphic commands are sent by sending the coordinates first, then a command to tell it what to do with them... such as a line, box, circle or other path.
Text is the same way, you send the text in parenthesis, then you send a command telling it what to do with the text. Normally the command you use is "show".
Unlike traditional printer, positioning is non-linear. You can add text to the page in any seqence you want. You can position text at the top, then the bottom like a regular printer, or you can randomly place the text at any time.
There are 72 points per inch, so if you want to work in inches, multiply the position desired by 72.
In a typical report, all you need to do is keep track of the current vertical position at any time, then subtract whatever number of points you need to jump down to the next line.
For horizontal positions, you should use static variables for the individual columns you are going to use.
Once you get past the basics, it's pretty easy to add some fancy stuff like lines, boxes, shadowed text, text on angles...etc. But for what it's worth, most reports don't need much of that.
Since Windows came along, I haven't written anything new to use PostScript in years, until I realized that the PostScript files it produce can be converted to PDF with programs like GhostScript... with a single line.
In my case, my programs spit out PS files from within web pages, then they launch GhostScript in the background and I get great PDF reports from the web site. Prior to that I struggled trying to get good printable reports or invoices from web applications.
Although it's easy to write PostScript, I'm only hand writing it in this case because the type of two sided multi-band reports I need are impossible with the built-in report generator.
For regular reports, my web-application uses a simple
"Set printer name PostScript"
"Report Form XYZ to file XYZ.PS"
"Run PS2PDF.BAT XYZ.PS"
In this case, my web server has a generic color postcript printer called "PostScript" (an HP Color LaserJet 8500PS), and it has GhostScript installed. I then created a one-line batch file called PS2PDF that generates the PDFs.