textfiles/programming/FORMATS/whatisps.txt

589 lines
30 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

% ************************************************************************
% ************************************************************************
% WHAT IS POSTSCRIPT? TUTORIAL
% ************************************************************************
%
% SUMMARY: Beginner's introduction to the PostScript language.
%
% PostScript features and advantages as a language, fonts,
% speed and costs, getting started, buying a printer.
%
% Copyright c 1990 by Don Lancaster. All rights reserved.
% Free help line and additional info: (602) 428-4073.
%
% ************************************************************************
% name of textfile: WHATISPS.TXT
% ....
% Copyright c 1990 by Don Lancaster and Synergetics, 3860 West First Street
% Thatcher, AZ. 85552. (602) 428-4073. All commercial rights reserved.
% Personal use permitted so long as this header remains present and intact.
% Write or call for our free PostScript insider secrets brochure and our
% product list. Free PostScript helpline 8-5 weekdays, Mountain Standard Time.
==========================================================================
WHAT is it that makes Adobe System's PostScript language so great? Why has
it become the page description language for practically all serious desktop
publishing?
Maybe we should start off with a simpler question, namely "Just what is the
PostScript language?"
Well, PostScript is a new computer language which is normally provided as
firmware that is already built into a PostScript speaking laser printer or
phototypesetter. You usually do not go out and buy a copy of PostScript.
Instead, you purchase or lease a ready-to-go PostScript speaking laser
printer or phototypesetter.
Or else you bolt a new PostScript-speaking firmware lid onto an older
and more primitive printer or phototypesetter to upgrade it. Or you
can buy PostScript emulator software for use on non-PostScript printers.
To use PostScript, all you need is some way of sending ordinary ASCII
textfiles to it. These textfiles contain the words and numbers that make up
the program. This can be done with any old word processor, editor, or comm
program on any old computer. There are also higher level "power" programs
that will automatically generate PostScript code for you, as well as
emulation software that lets PostScript imitate virtually any older and
poorer graphics language.
One key point that most beginners miss is that PostScript is a totally
general purpose computer language. So, anything you can do in "C", or in
BASIC, COBOL, Fortran or Pascal, can also be done with PostScript.
As with any other general purpose computer language, there are some things
that do get done very well and some not so well. PostScript happens to
excel at putting nice looking marks onto a printed page.
Thus, besides its being a totally general purpose computer language,
PostScript also turns out to be an absolutely outstanding page description
language, or PDL, for desktop through high end publishing.
PostScript usually has three different ways of outputting its answers. One
is to make marks on a page and then print that page. The second is to send
the results back to your host computer via the serial, AppleTalk or SCSI comm
channel. And the third is to write files to and from a SCSI hard drive or
CD ROM compact disk.
Many beginners often assume that PostScript can only output printed hard
copy. And thus they miss 2/3 of the richness of what PostScript can really
accomplish.
For instance, I routinely use the PostScript in my LaserWriter NTX with its
12 megabytes of RAM and its 68020 as the "mother's little helper" slave
co-processor for the 65C02 in my Apple IIe. Which really does snap things
up a tad.
At one time, the controller card in the original LaserWriter was far and
away the most powerful computer that Apple built.
WHAT ARE THE MAIN FEATURES OF POSTSCRIPT?
=========================================
PostScript is related to the Forth language as a third cousin twice removed
and seven times disowned. It is an exceptionally easy language to learn,
and quickly becomes totally and permanently addictive. As with Forth,
PostScript does use a reverse polish or postfix notation. While wierd to
look at the first time you see it, this arrangement turns out to let you
write exceptionally fast and quite clean high level code.
PostScript is normally interpreted. But it is quite easy to compile or else
pseudo-compile PostScript sequences for much faster operation.
Two important features of PostScript as a general purpose language is that
it is threaded and re-entrant. This means that any PostScript command can
call any other command, nestled to virtually any depth. Thus any command or
command sequence in the language can serve as a subroutine to any other
command or any command sequence.
A second major feature of PostScript as a general purpose language is that
it is extensible. This means you can add as many new commands to the
language as you like any way you want at any time. The only catch is that
anything new has to get defined through new combinations of already
existing commands. But this can go on forever.
You can also change the name or the meaning of any existing command. For
instance, your single new command book could automatically print up 25
copies of your 30 chapter book-on-demand printed math text routed to a
customized mailing list, including all equations and all figures and all
art. Even color photographs if you want to. And do all the invoicing and
paper ordering in its spare time.
While there are some 600 or so commands presently in the PostScript
language, you could start off doing interesting work with only a dozen of
these. On the other hand, you could easily add thousands of commands of
your own, so that the language will become uniquely yours to do with as you
please.
A third major feature of PostScript as a general purpose language is
that it is stack oriented. A stack is similar to the pile of trays at the
start of the cafeteria line. The stack manipulations can be very fast,
since you do not need any fancy or complex addressing schemes. PostScript
uses several stacks for different purposes.
PostScript also contains all of the usual goodies you would expect in a
general purpose language, including a for loop, if and ifelse conditionals,
repeats, random numbers, full trig capabilities, and most anything else
you'd like to see.
PostScript data types are unusually rich, and do include integers, floating
point numbers in any radix, strings, arrays, procedures, booleans,
dictionaries, operators, images, bitmaps, the literal names, and many more.
WHY IS POSTSCRIPT A GOOD PAGE DESCRIPTION LANGUAGE?
===================================================
Funny you should ask that. Let's start off with the PostScript device
independence. At the input end, this means that any old computer from a
ZX-80 to a CRAY-3 can be used as an input device, and that any software of
any kind that is capable of generating a plain old text file containing
ordinary words and numbers will work out just fine.
One interesting side effect here is that the more dedicated of Apple II,
Amiga, Atari, and even those Commodore 64 people are all grinding out
unusual and absolutely exceptional PostScript code, and often can do so
much faster, with fewer gotchas, and with far higher quality than do the
Mac and IBM power users.
On the other hand, the Mac and IBM folks have a far richer assortment of
the canned and ready-to-use applications programs that often will
automatically and invisibly generate PostScript code for them. And do so in
a more intuitive manner.
The beginning students in my EAC PostScript class have their choice of
Apple, IBM, PC clone, Mac, or VAX host computers. And they do seem to have
more or less equal luck on just about any host, once the personalities and
quirks of a user and usee get properly matched up. Although I still have
not seen anything on any of these other computers that would personally
move me away from using AppleWriter and WPL on a IIe for all of my
PostScript work. But that's only me.
Device independence on the output end gets even more important. Once your
book or whatever gets properly done on a 300 DPI laser printer, you can
carry your disk over to someone with a Linotron 200-P or 300
phototypesetter and then instantly upgrade into 2650 DPI photo masters for
the finest quality "real" printing you can dream of. All using the very
same PostScript files, and, of course, no rekeying or rework whatsoever.
PostScript normally uses the "full" bitmap of the entire page, at least on
most desktop laser printers. Since you do have the full image available,
you can easily scale, translate, and rotate any image in any direction
anywhere on the page.
PostScript is expert at handling clipping, where text and graphics are
limited to specified areas inside or outside of a selected path.
Moving right along, PostScript is exceptionally adept at its drawing of
smooth curves. Free flowing curves are handled through the use of cubic
splines, otherwise known as Bezier curves. As the curves get larger, they
automatically get smoother, unlike the Hershey Bar Effect common to more
primitive graphics languages.
TELL ME ALL ABOUT POSTSCRIPT FONTS.
===================================
One major advantage to PostScript lies in its handling of fonts. Unlike
bitmapped fonts, the fonts are intially saved in an outline form that
contains the rules for generating the character. Most importantly, the real
PostScript fonts also include detailed hints for handling character shapes
at lower resolutions and small sizes. It is this powerful hint machinery
that makes PostScript typography look so much better than its imitators.
One single PostScript font can be created in any size from 4 points to
18,000 points in quarter point increments. You can seperately control the
height, width, climb, shift, and slant of any character, as well as any and
all spacings between characters. Text along an arc, a circle, or even an
arbitrary path is trivially easy to do.
Powerful PostScript operators, especially -awidthshow- and -kshow- make
fill justification of text an attractive and easy operation.
You could also apply additional PostScript procs to your final font images
to outline them, make them three dimensional, to fill them, fatten them,
shadow them, write over backgrounds or even do litho chokes and spreads
with them.
Through the magic of a pixel line remapping technique, you can wrap text
around an isometric cylinder or a twisted piece of film. You can also do
true perspective lettering and all those "star wars" lettering effects at
ease. More on this in my LaserWriter Corner and Ask the Guru columns.
There are several sources of fonts. Between 11 and 35 fonts are normally
included in a stock laser printer, spread among nine font families that
include Courier, Times Roman, Helvetica, Symbol, Bookman, Palatino, Avant
Garde, Helvetica Narrow, 20th Century Schoolbook, Zapf Chancellery for your
calligraphy, and Zapf Dingbats for special effects.
You can also download soft fonts you have bought from a third party or
downloaded off a BBS system. There are many thousands of PostScript fonts
available today, ranging from amaterurish to the absolutely professional
and from free to several hundred dollars a copy. There are also several
sources of font-filled hard disks that give you hundreds of fully
professional fonts on line at once.
Finally, you can easily create your own font. And include logos,
signatures, barcodes, electronic symbols, or whatever else you want, in
most any way you like.
PostScript handles gray scales for line art very well, and has powerful
halftone machinery built in for the reproduction of photos. But many of
today's desktop laser printers cannot properly handle the high quality
halftones. Times are changing, though, and real fast like. Just as soon as
the machinery catches up, your already written PostScript code will be
ready for your use.
One thing that mystifies me is that most Mac and IBM PostScript users
absolutely insist on using the seventeenth most putrid gray for nearly all
of their layout work. Yet a few dozen keystrokes will instantly cure this
for dramatically improved results.
PostScript also has full color and color seperation abilities done up in
your choice of red-green-blue or the hue-saturation-brightness formats. The
latest versions of the PostScript code are further improving and expanding
on color printing options.
Traditionally, when you published a book, the words went one way and the
pictures went the other, and they hardly ever got properly recombined.
Despite its powerful font machinery, PostScript draws no real distinction
between its text and graphics. Which means that the interactions of your
pictures and words are much more closely controllable. Among other things,
this means you can eliminate forward and rearward figure references, just
by dropping the figure right where it belongs exactly when the text calls
for it.
Any graphical enhancements to the text, or the textual enhancements of
graphics are equally easy to handle.
You also include computations and your executive controlling commands in
the same PostScript sequence that's doing the page makeup. Obvious examples
that come to mind including a step and repeat for 12-up business cards;
creating an automatic multi-page directory that will fold properly;
speeding up labels and mailing lists by erasing only the name each time;
creating Mandlebrot fractals or those chaotic owls masks; printing an
invoice while calculating totals, taxes, and such; or doing an automatic
perspective drawing or printed circuit layout; or even the auto-printing of
bumper stickers or calligraphic awards at a flea market.
WHAT DON'T THE CRITICS LIKE ABOUT POSTSCRIPT?
=============================================
In the past, the critics without an axe to grind had two really big and
apparently valid complaints about PostScript. Its speed and its cost.
It does turn out that PostScript is incredibly faster than most people do
suspect. It is really the poorly written third party software and all the
slow communication and network speeds that give PostScript a bad name.
For instance, I routinely Book-on-demand print page after self-collating
page of three column, 6000 character high quality justified text with two
moderately complex figures, a header, and a footer, all with essentially
zero page makeready time.
This happens because the few seconds of paper feeding time suffice to
make up a properly pseudo-compiled page. Adobe's DISTILLERY is one
good example of a semi-automated pseudocompiling program.
Properly written and pseudo compiled PostScript code can run just as
fast as the printer can shove pages through itself. No competing page
description language can do any better than this.
Further, PostScript code gets at least 30 percent faster each generation.
But there's a double whammy in the works that should dramatically speed up
the next generation of the PostScript firmware. Perhaps by 10:1 or more. On
one hand, you have improved code gleaned from Adobe's new Display
PostScript that does not interpret as often or as deep. This has been
announced as PostScript Level Two.
On the other hand, you now have powerful new RISC microprocessors that
do in hardware what older versions of PostScript did by using software.
Especially a font cacheing trick called a BitBlt and for the cubic
calculations used in spline curve generation.
Ah yes. That price. A PostScript printer may cost almost double that of an
ordinary laser printer. But for this 2:1 or less price penalty, you gain a
50:1 to 100:1 performance improvement. I don't consider that an expense.
Instead, I would call it the bargain of the decade.
There are three other factors that make PostScript seem costly. One is the
royalty that gets paid to Adobe Systems for use of the PostScript language.
In reality, the royalties are ridiculously lower than you would suspect,
and cost about the same per machine as a better grade bottle of California
wine.
Second, PostScript usually will require a full size bitmap, some extra
memory for the font cache, and a sophisticated controlling microprocessor.
When memory prices recently went through the roof a while back, they
greatly magnified the list price differences between PostScript-speaking
and the more primitive printers.
Finally, PostScript printers have largely been offered by firms that have
traditionally had very high list prices, high dealer markups, and who
rarely discount. But today's street prices are often far lower than you'd
first guess. Especially from an independent dealer who is not part of a
yuppie chain and does not have some sort of lock on a regional market.
HOW DO I GET STARTED USING POSTSCRIPT?
======================================
As with any other powerful new computer tool, hands-on experience is
everything. The more the better.
Start off with a rental unit at a quick-copy shop, or borrow some time on a
neighbor's machine, or join a club that has a PostScript laser printer
available. In this day and age, immediate access to PostScript is simple
and easy to do. All you have to do is ask.
There are three major ways to use PostScript. Many people start off with a
canned applications package such as PageMaker (206) 622-5500, Ventura
Publisher (408) 422-0500, Adobe Illustrator (415) 961-4400, or FreeHand
(408) 422-0500. They then let these power packages write all of their
PostScript code for them.
A second method of using PostScript is through an emulator. Most emulators
will downgrade PostScript to the point where it imitates some older and
more limiting printer. The three most popular emulators are for the Diablo
630 Daisywheel, for the H-P LaserJet, and the ImageWriter. Other less
common emulators can match just about anything, including the HPGL plotting
language, the TEX mathematical typography language, the Gerber signplotter
code, and the various CAD-CAM layout commands.
Most people will outgrow their emulators around twelve minutes into their
use. Your daisywheel emulation goes down the tubes the instant you first
decide to use larger headings or a line border.
A free ImageWriter emulator that can be moved to any host computer is
available on the Apple IIgs system master disk known as SYSTEM.MASTER/
APPLETALK/IWEM. I do have some powertool gonzo justify code that can be
used as a more or less universal emulator or be converted into any specific
one. One variant of it gives you full Diablo emulation in letter or legal
length and portrait or landscape orientation.
I overwhelmingly prefer to write everything in bare metal PostScript. This
gives me far more flexibility and far more power. And often runs
ridiculously faster. It also lets me explore in oddball directions that are
non-obvious from within the canned applications programs.
But there is the front end learning, the personal involvment, and the lack
of screen images that scares others away from doing this. But not my students.
One of whom won a company award for her business cards after only four
hours of working in raw PostScript. And another who became a public
information officer mostly because of their newly gained PostScript skills.
Fortunately, practically all canned power packages have ways to import your
personal hand-crafted PostScript code. For most people most of the time,
the best option will be to go with a power package, supplemented by custom
PostScript code whenever something has to be done right.
Thus, the more you know and use your bare metal PostScript, the more
powerful the results you will end up with. Even if you use mostly canned
applications most of the time.
Of the many PostScript books, two are absolutely and totally essential.
These are the blue POSTSCRIPT COOKBOOK AND TUTORIAL and the red POSTSCRIPT
REFERENCE MANUAL. While I personally stock these, they are also found in
most major bookstores.
There is also a green POSTSCRIPT PROGRAM DESIGN and an orange REAL WORLD
POSTSCRIPT. While interesting, these are not nearly as useful as the red
and blue books.
Apple does provide a fairly useful white LASERWRITER REFERENCE which does
cover software and interface fairly well. Once again, I have these if you
can't find them locally.
I like to labor under the delusion that some of my own products are helpful
to any PostScript neophytes, especially my POSTSCRIPT SHOW AND TELL,
POSTSCRIPT BEGINNER STUFF, and my INTRO TO POSTSCRIPT VHS video, along with
the book-on-demand reprints of my previous columns.
Adobe Systems (415) 961-4400 has a free publication called FONT & FUNCTION.
They also have lots of tech publications and a good developer program.
A hot and currently active PostScript bulletin board is available as PSRT
under Genie. Call (800) 638-9636 (voice) to find your local access number.
There are lots of PostScript school courses of varying quality and price
available nationwide. My two-credit course costs $40 and gets held each
spring at Eastern Arizona College.
A final and extremely important PostScript resource involves your
networking with the other PostScript junkies. Its absolutely amazing some
of the ideas that bounce back and forth on obscure phone calls. And even
more amazing when an offbeat comment by one PostScript junkie becomes a
year long obsession (or a cash bonanza) to another.
WHICH POSTSCRIPT LASER PRINTER SHOULD I BUY?
============================================
For quite some time now, I have been running a free PostScript help line at
(602) 428-4073. We've gotten as many as 80 calls a day on the trials and
tribulations of PostScript laser printer ownership. What follows here is
the most accurate current info I've gotten directly from you end users.
I personally own one version 38 LaserWriter Plus with half a million copies
on it, the newer version 47 LaserWriter Plus, a LaserWriter II NTX with
a companion 20 meg SCSI hard disk, A HP Duplex LaserJet IID with an Adobe
PostScript cartridge, and a QMS turbo PS810. Some new low end machines are
on order.
Let's start off with three warnings on what not to do. There is a lot of
misinformation being circulated on the original LaserWriter SC. Note that
this is NOT a PostScript printer and, for its limited performance and
poor output quality, is one of the most blatantly overpriced laser
printers anywhere ever. An outright ripoff even.
While you can easily upgrade this beast into a decent PostScript printer,
what you are not told is that you will be fined a cash-down-the-drain
"upgrading penalty" that can range from several hundred to over $3000
whenever you inevetiably do attempt this. Avoid this turkey at all costs.
Helpline opinions on all the earlier Riccoh engines were also uniformly
bad. The typical complaints included the inability to show any small
typography, the lack of a manual feed, the dropout of the lightest gray
shade, and poor long term reliability.
While I am told that the newer Riccoh engines are supposed to be much
better, no one has yet proven this to my satisfaction.
Helpline opinion on the current Panasonic PostScript printers are that the
per-page toner costs are outrageously out of line and the consumables are
incredibly hard to find.
The general consensus today is that the Canon SX engine and its newer
offspring are the only way to go for any serious PostScript laser printing.
Nearly a dozen models are newly available from competing manufacturers.
The earlier complaint that the SX engine had per-page toner costs that were
as much as fifteen times higher than the earlier CX machines has now been
largely overcome.
New cartridge prices are dropping, especially from the Toners Plus folks
(800) 228-6637 and similar outfits that advertise in COMPUTER RESELLER
at (516) 365-4600.
More important, new hard-surface drum recoating services are available from
Lazer Products (303) 792-5277 and others that now allow as many as 12 and
even 13 SX refills. By doing your own quantity refilling, you can lower
your SX toner costs down into the 0.33 cents per page range that is
essential to compete against a jiffy printing or for any serious
Book-on-demand publishing.
I guess it boils down to this at present: Which SX engine should you buy
today for serious PostScript laser printing?
My current feelings go something like this: If you are spending someone
else's money, or if you do have access to an Apple developer or an
educational discount, then the Apple LaserWriter II NTX or the QMS turbo
820 are the "center of the universe" for most serious desktop laser
printing today.
I personally prefer the slightly faster QMS machine, but use both
it and the NTX continuously.
If you opt for either of these, be sure to get the companion 20 megabyte
hard disk to go with it. Without this hard disk, many of the performance
features will not be available. One gotcha: Be sure to use a SCSI drive
that can return its size to the host, or your drive will not work at all
with the NTX. Only a few of the non-Apple drives do offer this feature.
More details on this in my ASK THE GURU II.
Important advantages of these two that can justify their higher cost are
the faster 68020 processor and the further speedups caused by the disk
based dymanic font cache, by their ability to have thousands of fonts
instantly available without any hassle, by sneaky tricks that let you
capture final bitmaps, and for several other subtle speedup techniques.
If you cannot afford these, or have to spend your own money, but still do
have a definite business and cash flow, then that slower and simpler
LaserWriter II NT is a good everyday PostScript workhorse printer. Good
street prices on both the NT and NTX are available from COMPUTER WAREHOUSE
(818) 376-1662.
Information on QMS printers is available through the LASER CONNECTION
at (205) 633-4300. Once again, the turbo PS820 is my current favorite.
QMS is the only major printer supplier that directly handles PostScript
user support and service.
What about Hewlett-Packard? As they come from the factory, the SX engine
based LaserJet II printers do not speak PostScript. Fortunately, plug-in
PostScript cartridges are available from both HP and Adobe to make all of
the Laserjets PostScript compatible. Additional memory is also needed.
But note that there is a serious flaw in Adobe's -copypage- operator
that makes IID duplex printing unbearably slow and difficult. See the HP
IID review elsewhere in this library for more information on this.
Two things that H-P does handle well are their maintenence manuals and
spare parts. Overnight delivery to anybody via a 800 number and Visa
Since the engines are so similar, the H-P manuals and parts are 95
percent applicable to both Apple and QMS machines. No user of an Apple
laser printer should ever be without the relevant H-P manual for their
particular machine.
The H-P manual for the SX engine is #33440-90904, while their similar
manual for their older CX engine is #02686-90904. You will find both
through H-P Parts at (415) 857-1501.
As of this GENIE posting, a bunch of newer and much cheaper 4 PPM
PostScript laser printers are being introduced. These use an offspring
of the Canon SX engine. We'll be testing these thoroughly. For now, it
appears that HP has the best imaging, QMS the best performance, and
Apple the wimpiest CPU and the most outrageous pricing.
My interest in these is limited because of their slow printing speed.
There are several imitation PostScript laser printers that are widely
advertised, but I personally consider these to be totally unacceptable at
any price. At least for now.
Especially in their chronic inability to handle genuine Adobe downloadable
fonts with full hinting, and in their inability to handle the majority of
those "hidden" PostScript commands. By the way, that term "red book
compatibility" is almost totally meaningless. As with an iceberg, 90
percent of PostScript lies far below the surface.
The clone market is also extremely fragmented, and it is not at all clear
who will be around in a year or two, or what the long term quality of their
engines will be. Or the cost of their supplies.
Moving on down the price ladder, you can pick up older CX engines from a
number of sources for as little as $300. It is possible to get an older
Apple LaserWriter Plus PostScript I/O board and glomp it onto these
engines, and, in theory, end up with a full PostScript printer for less
than $1200 or so.
Sadly, the Apple I/O boards have become extremely scarce lately and their
price has skyrocketed following the coverage in previous issues of Computer
Shopper. At any rate, the low cost PostScript printers and conversion
information are sometimes available by way of THOMPSON AND THOMPSON found
at (714) 855-3838.
There are also some very low end PostScript-like software emulators that
can let you sample the flavor of PostScript, even with a dot matrix
printer. These products are typically priced in the shareware to $200
range. They usually are quite slow and are otherwise often severely limited
in their abilities, especially in handling fully hinted fonts. Three of the
many examples include FREEDOM OF THE PRESS (800) 873-4367, GOSCRIPT at
(619) 530-2400, ULTRASCRIPT at (205) 633-4300. PICTURE THIS shareware,
found at (606) 332-7606, is not an emulater but produces EPS files that
can be imported into other programs.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FREE VOICE HELPLINE AND ADDITIONAL INFO: (602) 428-4073
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%