HOME

TheInfoList



OR:

PostScript (PS) is a
page description language In digital printing, a page description language (PDL) is a computer language that describes the appearance of a printed page in a higher level than an actual output bitmap (or generally raster graphics). An overlapping term is printer control la ...
in the electronic publishing and
desktop publishing Desktop publishing (DTP) is the creation of documents using page layout software on a personal ("desktop") computer. It was first used almost exclusively for print publications, but now it also assists in the creation of various forms of online ...
realm. It is a
dynamically typed In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a type to every "term" (a word, phrase, or other set of symbols). Usually the terms are various constructs of a computer progra ...
,
concatenative programming language A concatenative programming language is a point-free computer programming language in which all expressions denote functions, and the juxtaposition of expressions denotes function composition. Concatenative programming replaces function appli ...
. It was created at Adobe Systems by
John Warnock John Edward Warnock (born October 6, 1940) is an American computer scientist and businessman best known for co-founding Adobe Systems Inc., the graphics and publishing software company, with Charles Geschke. Warnock was President of Adobe for ...
,
Charles Geschke Charles Matthew "Chuck" Geschke (September 11, 1939 – April 16, 2021) was an American businessman and computer scientist best known for founding the graphics and publishing software company Adobe Inc. with John Warnock in 1982, and co-creati ...
, Doug Brotz, Ed Taft and
Bill Paxton William Paxton (May 17, 1955 – February 25, 2017) was an American actor and filmmaker. He appeared in films such as '' Weird Science'' (1985), ''Aliens'' (1986), '' Near Dark'' (1987), '' Tombstone'' (1993), ''True Lies'' (1994), '' Apollo 1 ...
from 1982 to 1984.


History

The concepts of the PostScript language were seeded in 1976 by John Gaffney at
Evans & Sutherland Evans & Sutherland is a pioneering American computer firm in the computer graphics field. Its current products are used in digital projection environments like planetariums. Its simulation business, which it sold to Rockwell Collins, sold products ...
, a
computer graphics Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great de ...
company. At that time Gaffney and
John Warnock John Edward Warnock (born October 6, 1940) is an American computer scientist and businessman best known for co-founding Adobe Systems Inc., the graphics and publishing software company, with Charles Geschke. Warnock was President of Adobe for ...
were developing an interpreter for a large three-dimensional graphics database of New York Harbor. Concurrently, researchers at
Xerox PARC PARC (Palo Alto Research Center; formerly Xerox PARC) is a research and development company in Palo Alto, California. Founded in 1969 by Jacob E. "Jack" Goldman, chief scientist of Xerox Corporation, the company was originally a division of Xero ...
had developed the first
laser printer Laser printing is an electrostatic digital printing process. It produces high-quality text and graphics (and moderate-quality photographs) by repeatedly passing a laser beam back and forth over a negatively-charged cylinder called a "drum" to ...
and had recognized the need for a standard means of defining page images. In 1975-76
Bob Sproull Robert Fletcher "Bob" Sproull (born c. 1945) is an American computer scientist, who worked for Oracle Corporation where he was director of Oracle Labs in Burlington, Massachusetts. He is currently an adjunct professor at the College of Informa ...
and William Newman developed the Press format, which was eventually used in the
Xerox Star The Xerox Star workstation, officially named Xerox 8010 Information System, is the first commercial personal computer to incorporate technologies that have since become standard in personal computers, including a bitmapped display, a window-based ...
system to drive laser printers. But Press, a data format rather than a language, lacked flexibility, and PARC mounted the Interpress effort to create a successor. In 1978 John Gaffney and Martin Newell then at Xerox PARC wrote J & M or JaM (for "John and Martin") which was used for
VLSI Very large-scale integration (VLSI) is the process of creating an integrated circuit (IC) by combining millions or billions of MOS transistors onto a single chip. VLSI began in the 1970s when MOS integrated circuit (Metal Oxide Semiconductor) ...
design and the investigation of type and graphics printing. This work later evolved and expanded into the Interpress language. Warnock left with Chuck Geschke and founded Adobe Systems in December 1982. They, together with Doug Brotz, Ed Taft and
Bill Paxton William Paxton (May 17, 1955 – February 25, 2017) was an American actor and filmmaker. He appeared in films such as '' Weird Science'' (1985), ''Aliens'' (1986), '' Near Dark'' (1987), '' Tombstone'' (1993), ''True Lies'' (1994), '' Apollo 1 ...
created a simpler language, similar to Interpress, called PostScript, which went on the market in 1984. At about this time they were visited by Steve Jobs, who urged them to adapt PostScript to be used as the language for driving laser printers. In March 1985, the
Apple An apple is an edible fruit produced by an apple tree (''Malus domestica''). Apple trees are cultivated worldwide and are the most widely grown species in the genus ''Malus''. The tree originated in Central Asia, where its wild ancestor, ' ...
LaserWriter The LaserWriter is a laser printer with built-in PostScript interpreter sold by Apple, Inc. from 1985 to 1988. It was one of the first laser printers available to the mass market. In combination with WYSIWYG publishing software like PageMake ...
was the first printer to ship with PostScript, sparking the
desktop publishing Desktop publishing (DTP) is the creation of documents using page layout software on a personal ("desktop") computer. It was first used almost exclusively for print publications, but now it also assists in the creation of various forms of online ...
(DTP) revolution in the mid-1980s. The combination of technical merits and widespread availability made PostScript a language of choice for graphical output for printing applications. For a time an interpreter (sometimes referred to as a RIP for Raster Image Processor) for the PostScript language was a common component of laser printers, into the 1990s. However, the cost of implementation was high; computers output raw PS code that would be interpreted by the printer into a raster image at the printer's natural resolution. This required high performance
microprocessor A microprocessor is a computer processor where the data processing logic and control is included on a single integrated circuit, or a small number of integrated circuits. The microprocessor contains the arithmetic, logic, and control circ ...
s and ample
memory Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembered ...
. The LaserWriter used a 12 MHz Motorola 68000, making it faster than any of the Macintosh computers to which it attached. When the laser printer engines themselves cost over a thousand dollars the added cost of PS was marginal. But as printer mechanisms fell in price, the cost of implementing PS became too great a fraction of overall printer cost; in addition, with desktop computers becoming more powerful, it no longer made sense to offload the rasterization work onto the resource-constrained printer. By 2001, few lower-end printer models came with support for PostScript, largely due to growing competition from much cheaper non-PostScript ink jet printers, and new software-based methods to render PostScript images on the computer, making them suitable for any printer; PDF, a descendant of PostScript, provides one such method, and has largely replaced PostScript as ''
de facto ''De facto'' ( ; , "in fact") describes practices that exist in reality, whether or not they are officially recognized by laws or other formal norms. It is commonly used to refer to what happens in practice, in contrast with ''de jure'' ("by la ...
'' standard for electronic document distribution. On high-end printers, PostScript processors remain common, and their use can dramatically reduce the CPU work involved in printing documents, transferring the work of rendering PostScript images from the computer to the printer.


PostScript Level 1

The first version of the PostScript language was released to the market in 1984. The qualifier ''Level 1'' was added when Level 2 was introduced.


PostScript Level 2

PostScript Level 2 was introduced in 1991, and included several improvements: improved speed and reliability, support for in-Raster Image Processing (RIP) separations, image decompression (for example, JPEG images could be rendered by a PostScript program), support for composite
fonts In metal typesetting, a font is a particular size, weight and style of a typeface. Each font is a matched set of type, with a piece (a " sort") for each glyph. A typeface consists of a range of such fonts that shared an overall design. In mod ...
, and the form mechanism for caching reusable content.


PostScript 3

PostScript 3 (Adobe dropped the "level" terminology in favor of simple versioning) came at the end of 1997, and along with many new dictionary-based versions of older operators, introduced better color handling and new filters (which allow in-program compression/decompression, program chunking, and advanced error-handling). PostScript 3 was significant in terms of replacing the existing proprietary color electronic prepress systems, then widely used for magazine production, through the introduction of smooth shading operations with up to 4096 shades of grey (rather than the 256 available in PostScript Level 2), as well as DeviceN, a
color space A color space is a specific organization of colors. In combination with color profiling supported by various physical devices, it supports reproducible representations of colorwhether such representation entails an analog or a digital represen ...
that allowed the addition of additional ink colors (called
spot color In offset printing, a spot color or solid color is any color generated by an ink (pure or mixed) that is printed using a ''single run'', whereas a process color is produced by printing a series of dots of different colors. The widespread offset ...
s) into composite color pages.


Use in printing


Before PostScript

Prior to the introduction of PostScript, printers were designed to print character output given the text—typically in
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
—as input. There were a number of technologies for this task, but most shared the property that the
glyphs A glyph () is any kind of purposeful mark. In typography, a glyph is "the specific shape, design, or representation of a character". It is a particular graphical representation, in a particular typeface, of an element of written language. A g ...
were physically difficult to change, as they were stamped onto
typewriter A typewriter is a mechanical or electromechanical machine for typing characters. Typically, a typewriter has an array of keys, and each one causes a different single character to be produced on paper by striking an inked ribbon selectivel ...
keys, bands of metal, or optical plates. This changed to some degree with the increasing popularity of
dot matrix printer A dot matrix printer is an impact printer that prints using a fixed number of pins or wires. Typically the pins or wires are arranged in one or several vertical columns. The pins strike an ink-coated ribbon and force contact between the ribbon ...
s. The characters on these systems were drawn as a series of dots, as defined by a font table inside the printer. As they grew in sophistication, dot matrix printers started including several built-in fonts from which the user could select, and some models allowed users to upload their own custom glyphs into the printer. Dot matrix printers also introduced the ability to print raster graphics. The graphics were interpreted by the computer and sent as a series of dots to the printer using a series of
escape sequence In computer science, an escape sequence is a combination of characters that has a meaning other than the literal characters contained therein; it is marked by one or more preceding (and possibly terminating) characters. Examples * In C and ma ...
s. These
printer control language In digital printing, a page description language (PDL) is a computer language that describes the appearance of a printed page in a higher level than an actual output bitmap (or generally raster graphics). An overlapping term is printer control la ...
s varied from printer to printer, requiring program authors to create numerous drivers.
Vector graphics Vector graphics is a form of computer graphics in which visual images are created directly from geometric shapes defined on a Cartesian plane, such as points, lines, curves and polygons. The associated mechanisms may include vector display ...
printing was left to special-purpose devices, called plotters. Almost all plotters shared a common command language,
HPGL HP-GL, short for Hewlett-Packard Graphics Language and often written as HPGL, is a printer control language created by Hewlett-Packard (HP). HP-GL was the primary printer control language used by HP plotters. It was introduced with the plotteHP-89 ...
, but were of limited use for anything other than printing graphics. In addition, they tended to be expensive and slow, and thus rare.


PostScript printing

Laser printers combine the best features of both printers and plotters. Like plotters, laser printers offer high quality line art, and like dot-matrix printers, they are able to generate pages of text and raster graphics. Unlike either printers or plotters, a laser printer makes it possible to position high-quality graphics and text on the same page. PostScript made it possible to exploit fully these characteristics by offering a single control language that could be used on any brand of printer. PostScript went beyond the typical printer control language and was a complete programming language of its own. Many applications can transform a document into a PostScript program: the execution of which results in the original document. This program can be sent to an interpreter in a printer, which results in a printed document, or to one inside another application, which will display the document on-screen. Since the document-program is the same regardless of its destination, it is called ''device-independent''. PostScript is noteworthy for implementing 'on-the fly'
rasterization In computer graphics, rasterisation (British English) or rasterization (American English) is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image (a series of pixels, dots or lines, whi ...
in which everything, even text, is specified in terms of straight lines and cubic Bézier curves (previously found only in
CAD Computer-aided design (CAD) is the use of computers (or ) to aid in the creation, modification, analysis, or optimization of a design. This software is used to increase the productivity of the designer, improve the quality of design, improve co ...
applications), which allows arbitrary scaling, rotating and other transformations. When the PostScript program is interpreted, the interpreter converts these instructions into the dots needed to form the output. For this reason, PostScript interpreters are occasionally called PostScript
raster image processor A raster image processor (RIP) is a component used in a printing system which produces a raster image also known as a bitmap. Such a bitmap is used by a later stage of the printing system to produce the printed output. The input may be a page ...
s, or RIPs.


Font handling

Almost as complex as PostScript itself is its handling of
fonts In metal typesetting, a font is a particular size, weight and style of a typeface. Each font is a matched set of type, with a piece (a " sort") for each glyph. A typeface consists of a range of such fonts that shared an overall design. In mod ...
. The font system uses the PS graphics primitives to draw glyphs as curves, which can then be rendered at any
resolution Resolution(s) may refer to: Common meanings * Resolution (debate), the statement which is debated in policy debate * Resolution (law), a written motion adopted by a deliberative body * New Year's resolution, a commitment that an individual mak ...
. A number of
typographic Typography is the art and technique of typesetting, arranging type to make written language legibility, legible, readability, readable and beauty, appealing when displayed. The arrangement of type involves selecting typefaces, Point (typogra ...
issues had to be considered with this approach. One issue is that fonts do not scale linearly at small sizes and features of the glyphs will become proportionally too large or small and start to look displeasing. PostScript avoided this problem with the inclusion of
font hinting Font hinting (also known as instructing) is the use of mathematical instructions to adjust the display of an outline font so that it lines up with a rasterized grid. At low screen resolutions, hinting is critical for producing clear, legible tex ...
, in which additional information is provided in horizontal or vertical bands to help identify the features in each letter that are important for the rasterizer to maintain. The result was significantly better-looking fonts even at low resolution. It had formerly been believed that hand-tuned bitmap fonts were required for this task. At the time, the technology for including these hints in fonts was carefully guarded, and the hinted fonts were compressed and encrypted into what Adobe called a ''
Type 1 Font PostScript fonts are font files encoded in outline font specifications developed by Adobe Systems for professional digital typesetting. This system uses PostScript file format to encode font information. "PostScript fonts" may also separately be ...
'' (also known as ''PostScript Type 1 Font'', ''PS1'', ''T1'' or ''Adobe Type 1''). Type 1 was effectively a simplification of the PS system to store outline information only, as opposed to being a complete language (PDF is similar in this regard). Adobe would then sell licenses to the Type 1 technology to those wanting to add hints to their own fonts. Those who did not license the technology were left with the ''
Type 3 Font PostScript fonts are font files encoded in outline font specifications developed by Adobe Systems for professional digital typesetting. This system uses PostScript file format to encode font information. "PostScript fonts" may also separately ...
'' (also known as ''PostScript Type 3 Font'', ''PS3'' or ''T3''). Type 3 fonts allowed for all the sophistication of the PostScript language, but without the standardized approach to hinting. The
Type 2 font PostScript fonts are font files encoded in outline font specifications developed by Adobe Systems for professional digital typesetting. This system uses PostScript file format to encode font information. "PostScript fonts" may also separately b ...
format was designed to be used with
Compact Font Format PostScript fonts are font files encoded in outline font specifications developed by Adobe Systems for professional digital typesetting. This system uses PostScript file format to encode font information. "PostScript fonts" may also separately ...
(CFF) charstrings, and was implemented to reduce the overall font file size. The CFF/Type2 format later became the basis for handling PostScript outlines in
OpenType OpenType is a format for scalable computer fonts. It was built on its predecessor TrueType, retaining TrueType's basic structure and adding many intricate data structures for prescribing typographic behavior. OpenType is a registered trademark ...
fonts. The
CID-keyed font PostScript fonts are font files encoded in outline font specifications developed by Adobe Systems for professional digital typesetting. This system uses PostScript file format to encode font information. "PostScript fonts" may also separately be ...
format was also designed, to solve the problems in the OCF/Type 0 fonts, for addressing the complex Asian-language ( CJK) encoding and very large character set issues. The CID-keyed font format can be used with the Type 1 font format for standard CID-keyed fonts, or Type 2 for CID-keyed OpenType fonts. To compete with Adobe's system, Apple designed their own system,
TrueType TrueType is an outline font standard developed by Apple in the late 1980s as a competitor to Adobe's Type 1 fonts used in PostScript. It has become the most common format for fonts on the classic Mac OS, macOS, and Microsoft Windows operating ...
, around 1991. Immediately following the announcement of TrueType, Adobe published the specification for the Type 1 font format. Retail tools such as Altsys
Fontographer Fontographer (FOG) is a font editor for Windows and macOS; it is used to create digital fonts. It was originally developed by Altsys but is now owned by FontLab Ltd. History Altsys Corporation In December 1984, James R. Von Ehr II founded the ...
(acquired by
Macromedia Macromedia, Inc., was an American graphics, multimedia, and web development software company (1992–2005) headquartered in San Francisco, California, that made products such as Flash and Dreamweaver. It was purchased by its rival Adobe System ...
in January 1995, owned by FontLab since May 2005) added the ability to create Type 1 fonts. Since then, many free Type 1 fonts have been released; for instance, the fonts used with the
TeX Tex may refer to: People and fictional characters * Tex (nickname), a list of people and fictional characters with the nickname * Joe Tex (1933–1982), stage name of American soul singer Joseph Arrington Jr. Entertainment * ''Tex'', the Italian ...
typesetting system are available in this format. In the early 1990s there were several other systems for storing outline-based fonts, developed by
Bitstream A bitstream (or bit stream), also known as binary sequence, is a sequence of bits. A bytestream is a sequence of bytes. Typically, each byte is an 8-bit quantity, and so the term octet stream is sometimes used interchangeably. An octet may ...
and Metafont for instance, but none included a general-purpose printing solution and they were therefore not widely used. In the late 1990s, Adobe joined Microsoft in developing
OpenType OpenType is a format for scalable computer fonts. It was built on its predecessor TrueType, retaining TrueType's basic structure and adding many intricate data structures for prescribing typographic behavior. OpenType is a registered trademark ...
, essentially a functional superset of the Type 1 and TrueType formats. When printed to a PostScript output device, the unneeded parts of the OpenType font are omitted, and what is sent to the device by the driver is the same as it would be for a TrueType or Type 1 font, depending on which kind of outlines were present in the OpenType font.


Other implementations

In the 1980s, Adobe drew most of its revenue from the licensing fees for their implementation of PostScript for printers, known as a
raster image processor A raster image processor (RIP) is a component used in a printing system which produces a raster image also known as a bitmap. Such a bitmap is used by a later stage of the printing system to produce the printed output. The input may be a page ...
or ''RIP''. As a number of new RISC-based platforms became available in the mid-1980s, some found Adobe's support of the new machines to be lacking. This and issues of cost led to third-party implementations of PostScript becoming common, particularly in low-cost printers (where the licensing fee was the sticking point) or in high-end typesetting equipment (where the quest for speed demanded support for new platforms faster than Adobe could provide). At one point, Microsoft licensed to Apple a PostScript-compatible interpreter it had bought called
TrueImage TrueImage is a PostScript-compatible interpreter (clone) originally developed by Cal Bauer and Bauer Enterprises and sold to Microsoft in 1989. Microsoft subsequently cross-licensed TrueImage to Apple Computer in exchange for a TrueType license. A ...
, and Apple licensed to Microsoft its new font format,
TrueType TrueType is an outline font standard developed by Apple in the late 1980s as a competitor to Adobe's Type 1 fonts used in PostScript. It has become the most common format for fonts on the classic Mac OS, macOS, and Microsoft Windows operating ...
. Apple ended up reaching an accord with Adobe and licensed genuine PostScript for its printers, but TrueType became the standard
outline font A computer font is implemented as a digital data file containing a set of graphically related glyphs. A computer font is designed and created using a font editor. A computer font specifically designed for the computer screen, and not for print ...
technology for both Windows and the Macintosh. Today, third-party PostScript-compatible interpreters are widely used in printers and multifunction peripherals (MFPs). For example,
CSR plc CSR plc (formerly Cambridge Silicon Radio) was a multinational fabless semiconductor company headquartered in Cambridge, United Kingdom. Its main products were connectivity, audio, imaging and location chips. CSR was listed on the London Stoc ...
's IPS PS3 interpreter, formerly known as PhoenixPage, is standard in many printers and MFPs, including those developed by Hewlett-Packard and sold under the
LaserJet LaserJet as a brand name identifies the line of laser printers marketed by the American computer company Hewlett-Packard (HP). The HP LaserJet was the first popular desktop laser printer. Canon supplies both mechanisms and cartridges for most HP ...
and Color LaserJet lines. Other third-party PostScript solutions used by print and MFP manufacturers include Jaws and the Harlequin RIP, both by
Global Graphics Global Graphics PLC is known for its digital printing and document technology including the Harlequin and Jaws RIPs and the gDoc digital document software. The Company supplies its software under license to Original Equipment Manufacturers and so ...
. A
free software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, no ...
version, with several other applications, is
Ghostscript Ghostscript is a suite of software based on an interpreter for Adobe Systems' PostScript and Portable Document Format (PDF) page description languages. Its main purposes are the rasterization or rendering of such page description language file ...
. Several compatible interpreters are listed on the Undocumented Printing Wiki. Some basic, inexpensive laser printers do not support PostScript, instead coming with drivers that simply rasterize the platform's native graphics formats rather than converting them to PostScript first. When PostScript support is needed for such a printer, Ghostscript can be used. There are also a number of commercial PostScript interpreters, such as
TeleType Co. TeleType Co., Inc. is a privately held company in the United States, specialized in developing software for GPS devices. It was founded in 1981, under the name ''TeleTypesetting Company'' and it is based in Boston, Massachusetts. The company's ...
's T-Script.


Use as a display system

PostScript became commercially successful due to the introduction of the
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inst ...
(GUI), allowing designers to directly lay out pages for eventual output on laser printers. However, the GUI's own graphics systems were generally much less sophisticated than PostScript; Apple's
QuickDraw A quickdraw (also known as an extender) is a piece of climbing equipment used by rock and ice climbers to allow the climbing rope to run freely through protection such as a bolt anchors or other traditional gear while leading. A quickdr ...
, for instance, supported only basic lines and arcs, not the complex B-splines and advanced region filling options of PostScript. In order to take full advantage of PostScript printing, applications on the computers had to re-implement those features using the host platform's own graphics system. This led to numerous issues where the on-screen layout would not exactly match the printed output, due to differences in the implementation of these features. As computer power grew, it became possible to host the PS system in the computer rather than the printer. This led to the natural evolution of PS from a printing system to one that could also be used as the host's own graphics language. There were numerous advantages to this approach; not only did it help eliminate the possibility of different output on screen and printer, but it also provided a powerful graphics system for the computer, and allowed the printers to be "dumb" at a time when the cost of the laser engines was falling. In a production setting, using PostScript as a display system meant that the host computer could render low-resolution to the screen, higher resolution to the printer, or simply send the PS code to a smart printer for offboard printing. However, PostScript was written with printing in mind, and had numerous features that made it unsuitable for direct use in an interactive display system. In particular, PS was based on the idea of collecting up PS commands until the showpage command was seen, at which point all of the commands read up to that point were interpreted and output. In an interactive system this was clearly not appropriate. Nor did PS have any sort of interactivity built in; for example, supporting hit detection for mouse interactivity obviously did not apply when PS was being used on a printer. When Steve Jobs left Apple and started
NeXT Next may refer to: Arts and entertainment Film * ''Next'' (1990 film), an animated short about William Shakespeare * ''Next'' (2007 film), a sci-fi film starring Nicolas Cage * '' Next: A Primer on Urban Painting'', a 2005 documentary film Lit ...
, he pitched Adobe on the idea of using PS as the display system for his new workstation computers. The result was
Display PostScript Display PostScript (or DPS) is a 2D graphics engine system for computers which uses the PostScript (PS) imaging model and language (originally developed for computer printing) to generate on-screen graphics. To the basic PS system, DPS adds a num ...
, or DPS. DPS added basic functionality to improve performance by changing many string lookups into 32 bit integers, adding support for direct output with every command, and adding functions to allow the GUI to inspect the diagram. Additionally, a set of "bindings" was provided to allow PS code to be called directly from the C programming language. NeXT used these bindings in their
NeXTStep NeXTSTEP is a discontinued object-oriented, multitasking operating system based on the Mach kernel and the UNIX-derived BSD. It was developed by NeXT Computer in the late 1980s and early 1990s and was initially used for its range of propri ...
system to provide an
object oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of " objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of p ...
graphics system. Although DPS was written in conjunction with NeXT, Adobe sold it commercially and it was a common feature of most Unix workstations in the 1990s. Sun Microsystems took another approach, creating
NeWS News is information about current events. This may be provided through many different media: word of mouth, printing, postal systems, broadcasting, electronic communication, or through the testimony of observers and witnesses to events. N ...
. Instead of DPS's concept of allowing PS to interact with C programs, NeWS instead extended PS into a language suitable for running the entire GUI of a computer. Sun added a number of new commands for timers, mouse control, interrupts and other systems needed for interactivity, and added data structures and language elements to allow it to be completely object oriented internally. A complete GUI, three in fact, were written in NeWS and provided for a time on their workstations. However, the ongoing efforts to standardize the
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...
system led to its introduction and widespread use on Sun systems, and NeWS never became widely used.


Portable Document Format

The PDF and PostScript share the same imaging model and both documents are mutually convertible to each other. Both documents produce the same result when printed. The difference between the PDF and PostScript is that the PDF lacks the general-purpose programming language framework of the PostScript language. A PDF document is a static data structure made for efficient access and embeds navigational information suitable for interactive viewing.


The language

PostScript is a
Turing-complete In computability theory, a system of data-manipulation rules (such as a computer's instruction set, a programming language, or a cellular automaton) is said to be Turing-complete or computationally universal if it can be used to simulate any ...
programming language, belonging to the concatenative group. Typically, PostScript programs are not produced by humans, but by other programs. However, it is possible to write computer programs in PostScript just like any other programming language.PostScript Library
Don Lancaster's Guru's Lair. PostScript is an interpreted, stack-based language similar to Forth but with strong dynamic
typing Typing is the process of writing or inputting text by pressing keys on a typewriter, computer keyboard, mobile phone or calculator. It can be distinguished from other means of text input, such as handwriting and speech recognition. Text can b ...
, data structures inspired by those found in Lisp, scoped memory and, since language level 2,
garbage collection Waste collection is a part of the process of waste management. It is the transfer of solid waste from the point of use and disposal to the point of treatment or landfill. Waste collection also includes the curbside collection of recyclabl ...
. The language syntax uses
reverse Polish notation Reverse Polish notation (RPN), also known as reverse Łukasiewicz notation, Polish postfix notation or simply postfix notation, is a mathematical notation in which operators ''follow'' their operands, in contrast to Polish notation (PN), in whi ...
, which makes the order of operations unambiguous, but reading a program requires some practice, because one has to keep the layout of the stack in mind. Most ''operators'' (what other languages term ''functions'') take their arguments from the stack, and place their results onto the stack. '' Literals'' (for example, numbers) have the effect of placing a copy of themselves on the stack. Sophisticated data structures can be built on the ''array'' and ''dictionary'' types, but cannot be declared to the type system, which sees them all only as arrays and dictionaries, so any further typing discipline to be applied to such user-defined "types" is left to the code that implements them. The character "%" is used to introduce comments in PostScript programs. As a general convention, every PostScript program should start with the characters "%!PS" as an
interpreter directive An interpreter directive is a computer language construct, that on some systems is better described as an aspect of the system's executable file format, that is used to control which interpreter parses and interprets the instructions in a compute ...
so that all devices will properly interpret it as PostScript.


"Hello world"

A
Hello World program ''Hello'' is a salutation or greeting in the English language. It is first attested in writing from 1826. Early uses ''Hello'', with that spelling, was used in publications in the U.S. as early as the 18 October 1826 edition of the '' Norwich ...
, the customary way to show a small example of a complete program in a given language, might look like this in PostScript (level 2): %!PS /Courier % name the desired font 20 selectfont % choose the size in points and establish % the font as the current one 72 500 moveto % position the current point at % coordinates 72, 500 (the origin is at the % lower-left corner of the page) (Hello world!) show % stroke the text in parentheses showpage % print all on the page or if the output device has a console %!PS (Hello world!) =


Units of length

PostScript uses the point as its unit of length. However, unlike some of the other versions of the point, PostScript uses exactly 72 points to the inch. Thus: : For example, in order to draw a vertical line of 4 cm length, it is sufficient to type: 0 0 moveto 0 113.385827 lineto stroke More readably and idiomatically, one might use the following equivalent, which demonstrates a simple procedure definition and the use of the mathematical operators mul and div: /cm def % 1 inch = 2.54 cm exactly 0 0 moveto 0 4 cm lineto stroke Most implementations of PostScript use
single-precision Single-precision floating-point format (sometimes called FP32 or float32) is a computer number format, usually occupying 32 bits in computer memory; it represents a wide dynamic range of numeric values by using a floating radix point. A floatin ...
reals (24-bit mantissa), so it is not meaningful to use more than 9 decimal digits to specify a real number, and performing calculations may produce unacceptable round-off errors.


Software

List of software which can be used to render the PostScript documents: *
Ghostscript Ghostscript is a suite of software based on an interpreter for Adobe Systems' PostScript and Portable Document Format (PDF) page description languages. Its main purposes are the rasterization or rendering of such page description language file ...
*
pstoedit pstoedit is a free computer program that converts PostScript and PDF files to other vector formats. It supports many output formats, including WMF/EMF, PDF, DXF, CGM, and HTML, and by means of free/shareware plugins SVG, MIF and RTF. The a ...
*
Zathura ''Zathura'' is a 2002 science fiction children's literature, children's picture book written and illustrated by American author Chris Van Allsburg. In the story, two boys are drawn into an intergalactic space adventure when their house is magic ...


See also

*
Adobe StandardEncoding The PostScript Standard Encoding (often spelled StandardEncoding, aliased as PostScript) is one of the character sets (or encoding vectors) used by Adobe Systems' PostScript (PS) since 1984 (1982). In 1995, IBM assigned code page 1276 (CCSID 1276) ...
(PostScript character set) *
Document Structuring Conventions Document Structuring Conventions, or DSC, is a set of standards for PostScript, based on the use of comments, which primarily specifies a way to structure a PostScript file and a way to expose that structure in a machine-readable way. A PostScript f ...
*
Typeface A typeface (or font family) is the design of lettering that can include variations in size, weight (e.g. bold), slope (e.g. italic), width (e.g. condensed), and so on. Each of these variations of the typeface is a font. There are thousands o ...
*
Computer font A computer font is implemented as a digital data file containing a set of graphically related glyphs. A computer font is designed and created using a font editor. A computer font specifically designed for the computer screen, and not for print ...
* Encapsulated PostScript *
PostScript Printer Description PostScript Printer Description (PPD) files are created by vendors to describe the entire set of features and capabilities available for their PostScript printers. A PPD also contains the PostScript code (commands) used to invoke features for the p ...
(PPD) *
Printer Command Language Printer Command Language, more commonly referred to as PCL, is a page description language (PDL) developed by Hewlett-Packard as a printer protocol and has become a ''de facto'' industry standard. Originally developed for early inkjet printer ...
(PCL) *
LaTeX Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latexes are found in nature, but synthetic latexes are common as well. In nature, latex is found as a milky fluid found in 10% of all flowering plants (angiosperms ...


References


Further reading

* (NB. This book (''PLR3'') together with the is the ''de facto'' defining work on PostScript 3 and is informally called "red book" due to its red cover.) * (NB. This edition (''PLR2'') covers PostScript Level 2 and also contains a description of Display PostScript, which is no longer discussed in the third edition.) * (NB. This edition (''PLR1'') covers PostScript Level 1.) * (NB. This introductory text is informally called "blue book" due to its blue cover.) * (NB. This book is informally called "green book" due to its green cover.) * (NB. This book is informally called "black book" due to its black cover.) * (NB. Official introductory comparison of PS, EPS vs. PDF.) *

* (NB. A thorough tutorial available online courtesy of the author.)


External links


Computer History Museum: article about early development of PostScript
{{DEFAULTSORT:Postscript PostScript, Adobe Inc. Computer printing Computer-related introductions in 1982 Concatenative programming languages Digital press Digital typography Dynamically typed programming languages Office document file formats Open formats Page description languages Stack-based virtual machines Stack-oriented programming languages Technical communication Vector graphics