PostScript
Encyclopedia
PostScript is a dynamically typed concatenative
Concatenative programming language
A concatenative programming language is a point-free programming language in which all expressions denote functions and the juxtaposition of expressions denotes function composition...

 programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 created by John Warnock
John Warnock
John Edward Warnock is an American computer scientist best known as the co-founder with Charles Geschke of Adobe Systems Inc., the graphics and publishing software company. Dr. Warnock was President of Adobe for his first two years and Chairman and CEO for his remaining sixteen years at the company...

 and Charles Geschke
Charles Geschke
Charles Geschke, is best known as the 1982 co-founder with John Warnock of Adobe Systems Inc., the graphics and publishing software company.-Education:...

 in 1982. It is best known for its use as a page description language
Page description language
A page description language is a language that describes the appearance of a printed page in a higher level than an actual output bitmap. An overlapping term is printer control language, but it should not be confused as referring solely to Hewlett-Packard's PCL...

 in the electronic and desktop publishing
Desktop publishing
Desktop publishing is the creation of documents using page layout software on a personal computer.The term has been used for publishing at all levels, from small-circulation documents such as local newsletters to books, magazines and newspapers...

 areas. Adobe
Adobe Systems
Adobe Systems Incorporated is an American computer software company founded in 1982 and headquartered in San Jose, California, United States...

 PostScript 3 is also the worldwide printing and imaging standard. Used by print service providers, publishers, corporations, and government agencies around the globe, Adobe PostScript enables reliable printing of visually rich documents.

History

The concepts of the PostScript language were seeded in 1976 when John Warnock was working at Evans & Sutherland
Evans & Sutherland
Evans & Sutherland is a computer firm involved in the computer graphics field. Their products are used primarily by the military and large industrial firms for training and simulation, and in digital projection environments like planetariums.-History:...

, a computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

 company. At that time John Warnock was developing an interpreter for a large three-dimensional graphics database of New York
New York
New York is a state in the Northeastern region of the United States. It is the nation's third most populous state. New York is bordered by New Jersey and Pennsylvania to the south, and by Connecticut, Massachusetts and Vermont to the east...

 harbor. Warnock conceived the Design System language to process the graphics.

Concurrently, researchers at Xerox PARC
Xerox PARC
PARC , formerly Xerox PARC, is a research and co-development company in Palo Alto, California, with a distinguished reputation for its contributions to information technology and hardware systems....

 had developed the first laser printer
Laser printer
A laser printer is a common type of computer printer that rapidly produces high quality text and graphics on plain paper. As with digital photocopiers and multifunction printers , laser printers employ a xerographic printing process, but differ from analog photocopiers in that the image is produced...

 and had recognized the need for a standard means of defining page images. In 1975-76 Bob Sproull
Bob Sproull
Dr Robert F. Sproull is an American computer scientist, who works for Oracle Corporation where he is director of Oracle Labs in Burlington, Massachusetts .- Biography :...

 and William Newman developed the Press format, which was eventually used in the Xerox Star
Xerox Star
The Star workstation, officially known as the Xerox 8010 Information System, was introduced by Xerox Corporation in 1981. It was the first commercial system to incorporate various technologies that today have become commonplace 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
InterPress
InterPress is a page description language developed at Xerox PARC, based on the Forth programming language and an earlier graphics language called JaM...

 effort to create a successor.

In 1978 Evans and Sutherland asked Warnock to move from the San Francisco Bay Area
San Francisco Bay Area
The San Francisco Bay Area, commonly known as the Bay Area, is a populated region that surrounds the San Francisco and San Pablo estuaries in Northern California. The region encompasses metropolitan areas of San Francisco, Oakland, and San Jose, along with smaller urban and rural areas...

 to their main headquarters in Utah
Utah
Utah is a state in the Western United States. It was the 45th state to join the Union, on January 4, 1896. Approximately 80% of Utah's 2,763,885 people live along the Wasatch Front, centering on Salt Lake City. This leaves vast expanses of the state nearly uninhabited, making the population the...

, but he was not interested in moving. He then joined Xerox PARC to work with Martin Newell. They rewrote Design System to create JaM (for "John and Martin") which was used for VLSI
Very-large-scale integration
Very-large-scale integration is the process of creating integrated circuits by combining thousands of transistors into a single chip. VLSI began in the 1970s when complex semiconductor and communication technologies were being developed. The microprocessor is a VLSI device.The first semiconductor...

 design and the investigation of type and graphics printing. This work later evolved and expanded into the InterPress
InterPress
InterPress is a page description language developed at Xerox PARC, based on the Forth programming language and an earlier graphics language called JaM...

 language.

Warnock left with Chuck Geschke and founded Adobe Systems
Adobe Systems
Adobe Systems Incorporated is an American computer software company founded in 1982 and headquartered in San Jose, California, United States...

 in December 1982. They 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
Steve Jobs
Steven Paul Jobs was an American businessman and inventor widely recognized as a charismatic pioneer of the personal computer revolution. He was co-founder, chairman, and chief executive officer of Apple Inc...

, who urged them to adapt PostScript to be used as the language for driving laser printers.

In March 1985, the Apple
Apple Computer
Apple Inc. is an American multinational corporation that designs and markets consumer electronics, computer software, and personal computers. The company's best-known hardware products include the Macintosh line of computers, the iPod, the iPhone and the iPad...

 LaserWriter
LaserWriter
The LaserWriter was a laser printer with built-in PostScript interpreter introduced by Apple in 1985. It was one of the first laser printers available to the mass market...

 was the first printer to ship with PostScript, sparking the desktop publishing
Desktop publishing
Desktop publishing is the creation of documents using page layout software on a personal computer.The term has been used for publishing at all levels, from small-circulation documents such as local newsletters to books, magazines and newspapers...

 (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
Raster image processor
A raster image processor is a component used in a printing system which produces a raster image also known as a bitmap. The bitmap is then sent to a printing device for output. The input may be a page description in a high-level page description language such as PostScript, Portable Document...

 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
Microprocessor
A microprocessor incorporates the functions of a computer's central processing unit on a single integrated circuit, or at most a few integrated circuits. It is a multipurpose, programmable device that accepts digital data as input, processes it according to instructions stored in its memory, and...

s and ample memory
Computer memory
In computing, memory refers to the physical devices used to store programs or data on a temporary or permanent basis for use in a computer or other digital electronic device. The term primary memory is used for the information in physical systems which are fast In computing, memory refers to the...

. The LaserWriter used a 12 MHz Motorola 68000
Motorola 68000
The Motorola 68000 is a 16/32-bit CISC microprocessor core designed and marketed by Freescale Semiconductor...

, making it faster than any of the Macintosh computers it attached to. 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 an increasingly greater percentage of the overall printer cost, and thus it succumbed to cost competition in the lower-priced market tiers.

Once the de facto
De facto
De facto is a Latin expression that means "concerning fact." In law, it often means "in practice but not necessarily ordained by law" or "in practice or actuality, but not officially established." It is commonly used in contrast to de jure when referring to matters of law, governance, or...

standard for electronic distribution of final documents meant for publication, PostScript is steadily being supplanted in this area by one of its own descendants, the Portable Document Format or PDF
Portable Document Format
Portable Document Format is an open standard for document exchange. This file format, created by Adobe Systems in 1993, is used for representing documents in a manner independent of application software, hardware, and operating systems....

. By 2001 there were fewer printer models which came with support for PostScript, largely due to the 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 provided one such method). The use of a PostScript laser printer still can, however, significantly reduce the CPU workload involved in printing documents, transferring the work of rendering PostScript images from the computer to the printer. PostScript is still an option on most "high end" models.

PostScript Level 1

The first version of the PostScript language was released to the market in 1984.

PostScript Level 2

PostScript Level 2 was introduced in 1991, and included several improvements: improved speed and reliability, support for in-RIP separations, image decompression
Image compression
The objective of image compression is to reduce irrelevance and redundancy of the image data in order to be able to store or transmit data in an efficient form.- Lossy and lossless compression :...

 (for example, JPEG
JPEG
In computing, JPEG . The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality. JPEG typically achieves 10:1 compression with little perceptible loss in image quality....

 images could be rendered by a PostScript program), support for composite fonts, 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 2), as well as DeviceN, a color space
Color space
A color model is an abstract mathematical model describing the way colors can be represented as tuples of numbers, typically as three or four values or color components...

 that allowed the addition of additional ink colors (called spot color
Spot color
In offset printing, a spot color is any color generated by an ink that is printed using a single run.The widely spread offset-printing process is composed of four spot colors: Cyan, Magenta, Yellow, and Key commonly referred to as CMYK...

s) into composite color pages.

Before PostScript

Prior to the introduction of PostScript, printers were designed to print character output given the text—typically in ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

—as input. There were a number of technologies for this task, but most shared the property that the glyph
Glyph
A glyph is an element of writing: an individual mark on a written medium that contributes to the meaning of what is written. A glyph is made up of one or more graphemes....

s were physically difficult to change, as they were stamped onto typewriter
Typewriter
A typewriter is a mechanical or electromechanical device with keys that, when pressed, cause characters to be printed on a medium, usually paper. Typically one character is printed per keypress, and the machine prints the characters by making ink impressions of type elements similar to the pieces...

 keys, bands of metal, or optical plates.

This changed to some degree with the increasing popularity of dot matrix printer
Dot matrix printer
A dot matrix printer or impact matrix printer is a type of computer printer with a print head that runs back and forth, or in an up and down motion, on the page and prints by impact, striking an ink-soaked cloth ribbon against the paper, much like the print mechanism on a typewriter...

s. The characters on these systems were drawn as a series of dots, as defined by a font
Typeface
In typography, a typeface is the artistic representation or interpretation of characters; it is the way the type looks. Each type is designed and there are thousands of different typefaces in existence, with new ones being developed constantly....

 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
Raster graphics
In computer graphics, a raster graphics image, or bitmap, is a data structure representing a generally rectangular grid of pixels, or points of color, viewable via a monitor, paper, or other display medium...

. The graphics were interpreted by the computer and sent as a series of dots to the printer using a series of escape sequence
Escape sequence
An escape sequence is a series of characters used to change the state of computers and their attached peripheral devices. These are also known as control sequences, reflecting their use in device control. Some control sequences are special characters that always have the same meaning...

s. These printer control languages varied from printer to printer, requiring program authors to create numerous drivers
Device driver
In computing, a device driver or software driver is a computer program allowing higher-level computer programs to interact with a hardware device....

.

Vector graphics printing was left to special-purpose devices, called plotter
Plotter
A plotter is a computer printing device for printing vector graphics. In the past, plotters were widely used in applications such as computer-aided design, though they have generally been replaced with wide-format conventional printers...

s. Almost all plotters did share a common command language, HPGL
HPGL
HPGL, sometimes hyphenated as HP-GL, was the primary printer control language used by Hewlett-Packard plotters. The name is an initialism for Hewlett-Packard Graphics Language. It later became a standard for almost all plotters...

, 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, however, a laser printer makes it possible to position high-quality graphics and text on the same page. PostScript made it possible to fully exploit 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 whose execution will result 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; everything, even text, is specified in terms of straight lines and cubic Bézier curve
Bézier curve
A Bézier curve is a parametric curve frequently used in computer graphics and related fields. Generalizations of Bézier curves to higher dimensions are called Bézier surfaces, of which the Bézier triangle is a special case....

s (previously found only in CAD 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 also sometimes called PostScript Raster Image Processor
Raster image processor
A raster image processor is a component used in a printing system which produces a raster image also known as a bitmap. The bitmap is then sent to a printing device for output. The input may be a page description in a high-level page description language such as PostScript, Portable Document...

s, or RIPs.

Font handling

Almost as complex as PostScript itself was its handling of fonts
Typeface
In typography, a typeface is the artistic representation or interpretation of characters; it is the way the type looks. Each type is designed and there are thousands of different typefaces in existence, with new ones being developed constantly....

. The rich font system used the PS graphics primitives to draw glyphs as line art
Line art
Line art is any image that consists of distinct straight and curved lines placed against a background, without gradations in shade or hue to represent two-dimensional or three-dimensional objects...

, which could then be rendered at any resolution
Image resolution
Image resolution is an umbrella term that describes the detail an image holds. The term applies to raster digital images, film images, and other types of images. Higher resolution means more image detail....

. Though this sounds like a reasonably straightforward concept, there were a number of typographic issues that had to be considered.

One issue is that fonts do not actually scale linearly at small sizes; features of the glyphs will become proportionally too large or small and they start to look wrong. PostScript avoided this problem with the inclusion of hint
Font hinting
Font hinting 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 a clear, legible text...

s which could be saved along with the font outlines. Basically they are additional information in horizontal or vertical bands that 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 (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 (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. Other differences further added to the confusion.

Type 2 was designed to be used with the Compact Font Format (CFF), and were implemented for a compact representation of the glyph description procedures to reduce the overall font file size. The CFF/Type2 format later became the basis for Type 1 OpenType
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...

 fonts.

CID-keyed font format was also designed, to solve the problems in the OCF/Type 0 fonts, for addressing the complex Asian-language (CJK
CJK
CJK is a collective term for Chinese, Japanese, and Korean, which is used in the field of software and communications internationalization.The term CJKV means CJK plus Vietnamese, which constitute the main East Asian languages.- Characteristics :...

) encoding and very large character set issues. 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.

Adobe's rates were widely considered to be prohibitively high, and it was this issue that led Apple to design their own system, TrueType
TrueType
TrueType is an outline font standard originally developed by Apple Computer in the late 1980s as a competitor to Adobe's Type 1 fonts used in PostScript...

, 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
Fontographer , is a software application used to create digital fonts, available for both Microsoft Windows and Apple Macintosh platforms. It was originally developed by Altsys but is now owned by FontLab Ltd.-Fontastic:...

 (acquired by Macromedia
Macromedia
Macromedia was an American graphics and web development software company headquartered in San Francisco, California that produced such products as Flash and Dreamweaver. Its rival, Adobe Systems, acquired Macromedia on December 3, 2005 and controls the line of Macromedia...

 in January 1995, owned by FontLab
FontLab
FontLab is both the name of a company, FontLab Ltd, and the former name of their flagship font editor product, now called FontLab Studio. Since the early 2000s, FontLab Studio has been the dominant software tool for commercial/retail digital font development. This is partly because the...

 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
TeX is a typesetting system designed and mostly written by Donald Knuth and released in 1978. Within the typesetting system, its name is formatted as ....

 typesetting system are available in this format.

In the early 1990s there were several other systems for storing outline-based fonts, developed by Bitstream
Bitstream Inc.
Bitstream Inc. is a type foundry that produces digital typefaces . Founded in 1981 by Matthew Carter and Mike Parker among others, it claims to be the oldest such company...

 and METAFONT
METAFONT
Metafont is a programming language used to define vector fonts. It is also the name of the interpreter that executes Metafont code, generating the bitmap fonts that can be embedded into e.g. PostScript...

 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
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...

, 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
Raster image processor
A raster image processor is a component used in a printing system which produces a raster image also known as a bitmap. The bitmap is then sent to a printing device for output. The input may be a page description in a high-level page description language such as PostScript, Portable Document...

 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 and Apple teamed up to try to unseat Adobe's laser printer monopoly, Microsoft licensing to Apple a PostScript-compatible interpreter it had bought called TrueImage
TrueImage
TrueImage is a PostScript-compatible interpreter 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...

, and Apple licensing to Microsoft its new font format, TrueType
TrueType
TrueType is an outline font standard originally developed by Apple Computer in the late 1980s as a competitor to Adobe's Type 1 fonts used in PostScript...

. (Apple ended up reaching an accord with Adobe and licensed genuine PostScript for its printers, but TrueType became the standard outline font 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
CSR , or Cambridge Silicon Radio, is a company based in Cambridge, England. CSR is a fabless semiconductor company whose main product lines include connectivity, audio and location chips. It is listed on the London Stock Exchange and is a constituent of the FTSE 250 Index...

's IPS PS3 interpreter, formerly known as PhoenixPage, is standard in many printers and MFPs, including those developed by Hewlett-Packard
Hewlett-Packard
Hewlett-Packard Company or HP is an American multinational information technology corporation headquartered in Palo Alto, California, USA that provides products, technologies, softwares, solutions and services to consumers, small- and medium-sized businesses and large enterprises, including...

 and sold under the LaserJet
LaserJet
LaserJet as a brand name identifies the line of dry electrophotographic laser printers marketed by the American computer-company Hewlett-Packard . The HP LaserJet was the world's first desktop laser printer.-Technology:...

 and Color LaserJet lines. Other third-party PostScript solutions used by print and MFP manufacturers include Jaws and the Harlequin RIP
Harlequin RIP
The Harlequin RIP was first released in 1990 under the name “ScriptWorks” running as a command-line application to render PostScript language files under Unix...

, both provided by Global Graphics
Global Graphics
Global Graphics SA is a group of companies known for their digital printing products, including the Harlequin and Jaws RIPs. In May 2009 the company launched gDoc Fusion, an edocument builder software application designed for ease of use to create, review, edit, share and archive PDF and XPS...

. Several compatible interpreters are listed on the Undocumented Printing Wiki.

Still, some basic, inexpensive laser printers don't 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, a free
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 PostScript-compatible interpreter called Ghostscript
Ghostscript
Ghostscript is a suite of software based on an interpreter for Adobe Systems' PostScript and Portable Document Format page description languages.- Features :...

 can be used. Ghostscript prints PostScript documents on non-PostScript printers using the CPU
Central processing unit
The central processing unit is the portion of a computer system that carries out the instructions of a computer program, to perform the basic arithmetical, logical, and input/output operations of the system. The CPU plays a role somewhat analogous to the brain in the computer. The term has been in...

 of the host computer to do the rasterization, sending the result as a single large bitmap to the printer. Ghostscript can also be used to preview PostScript documents on a computer monitor and to convert PostScript pages into raster graphics
Raster graphics
In computer graphics, a raster graphics image, or bitmap, is a data structure representing a generally rectangular grid of pixels, or points of color, viewable via a monitor, paper, or other display medium...

 such as TIFF and PNG, and vector formats such as PDF
Portable Document Format
Portable Document Format is an open standard for document exchange. This file format, created by Adobe Systems in 1993, is used for representing documents in a manner independent of application software, hardware, and operating systems....

. There are a number of commercial PostScript interpreters also, such as TeletypeSetting Co.'s
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 product line includes automotive and commercial GPS...

 T-Script.

Very high-resolution devices, such as imagesetter
Imagesetter
An imagesetter is an ultra-high resolution large-format computer output device. It exposes rolls or sheets of either photographic film or bromide paper to a laser light source. Once the film or paper is developed, a very high quality black and white image is revealed...

s or CTP
Computer to plate
Computer to plate is an imaging technology used in modern printing processes. In this technology, an image created in a Desktop Publishing application is output directly to a printing plate....

 platesetter
Platesetter
A platesetter is a machine which receives a raster image from a raster image processor and in turn, creates a lithographic plate suitable for use on an offset press....

s, in which resolutions exceeding 2500 dpi are common, still require external RIPs with large amounts of memory and hard drive space. Very high-end laser printer systems (known as digital presses) also use an external RIP to separate the more readily-upgradable computer from the specialized printing hardware. Companies such as EFI
EFI
-Organizations and institutions:*Enrico Fermi Institute, a research centre by the University of Chicago*Equestrian Federation of Ireland, an equestrian sporting body*European Forest Institute, a research centre...

 and Xitron specialize in such RIP software.

Use as a display system

PostScript became commercially successful due to the introduction of the graphical user interface
Graphical user interface
In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...

, 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
QuickDraw
QuickDraw is the 2D graphics library and associated Application Programming Interface which is a core part of the classic Apple Macintosh operating system. It was initially written by Bill Atkinson and Andy Hertzfeld. QuickDraw still exists as part of the libraries of Mac OS X, but has been...

, for instance, supported only basic lines and arcs, not the complex B-spline
B-spline
In the mathematical subfield of numerical analysis, a B-spline is a spline function that has minimal support with respect to a given degree, smoothness, and domain partition. B-splines were investigated as early as the nineteenth century by Nikolai Lobachevsky...

s 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
Steve Jobs
Steven Paul Jobs was an American businessman and inventor widely recognized as a charismatic pioneer of the personal computer revolution. He was co-founder, chairman, and chief executive officer of Apple Inc...

 left Apple and started NeXT
NeXT
Next, Inc. was an American computer company headquartered in Redwood City, California, that developed and manufactured a series of computer workstations intended for the higher education and business markets...

, 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
Display PostScript is an on-screen display system. As the name implies, DPS uses the PostScript imaging model and language to generate on-screen graphics...

, 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
NeXTSTEP was the object-oriented, multitasking operating system developed by NeXT Computer to run on its range of proprietary workstation computers, such as the NeXTcube...

 system to provide an object oriented 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
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

 took another approach, creating NeWS
NeWS
NeWS was a windowing system developed by Sun Microsystems in the mid 1980s. Originally known as "SunDew", its primary authors were James Gosling and David S. H. Rosenthal...

. 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 structure
Data structure
In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks...

s 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 system led to its introduction and widespread use on Sun systems, and NeWS never became widely used.

The language

PostScript is a Turing-complete programming language, belonging to the concatenative
Concatenative programming language
A concatenative programming language is a point-free programming language in which all expressions denote functions and the juxtaposition of expressions denotes function composition...

 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 is an interpreted
Interpreted language
Interpreted language is a programming language in which programs are 'indirectly' executed by an interpreter program. This can be contrasted with a compiled language which is converted into machine code and then 'directly' executed by the host CPU...

, stack-based
Stack-oriented programming language
A stack-oriented programming language is one that relies on a stack machine model for passing parameters. Several programming languages fit this description, notably Forth, RPL, PostScript, and also many Assembly languages ....

 language similar to Forth but with strong dynamic typing
Type system
A type system associates a type with each computed value. By examining the flow of these values, a type system attempts to ensure or prove that no type errors can occur...

, data structures inspired by those found in Lisp
Lisp programming language
Lisp is a family of computer programming languages with a long history and a distinctive, fully parenthesized syntax. Originally specified in 1958, Lisp is the second-oldest high-level programming language in widespread use today; only Fortran is older...

, scoped memory and, since language level 2, garbage collection
Garbage collection (computer science)
In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program...

. The language syntax uses reverse Polish notation
Reverse Polish notation
Reverse Polish notation is a mathematical notation wherein every operator follows all of its operands, in contrast to Polish notation, which puts the operator in the prefix position. It is also known as Postfix notation and is parenthesis-free as long as operator arities are fixed...

, which makes the order of operations unambiguous, but reading a program requires some practice, because one has to keep the layout of the stack
Stack (data structure)
In computer science, a stack is a last in, first out abstract data type and linear data structure. A stack can have any abstract data type as an element, but is characterized by only three fundamental operations: push, pop and stack top. The push operation adds a new item to the top 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 "%!" as an interpreter directive
Interpreter directive
An interpreter directive is a computer language construct that is used to control which interpreter parses and interprets the instructions in a computer program.- See also :* Shebang * Bourne-Again Shell* C Shell...

 so that all devices will properly interpret it as PostScript.

"Hello world"

A Hello World program
Hello world program
A "Hello world" program is a computer program that outputs "Hello world" on a display device. Because it is typically one of the simplest programs possible in most programming languages, it is by tradition often used to illustrate to beginners the most basic syntax of a programming language, or to...

, 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
Point (typography)
In typography, a point is the smallest unit of measure, being a subdivision of the larger pica. It is commonly abbreviated as pt. The point has long been the usual unit for measuring font size and leading and other minute items on a printed page....

 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:

/mm { 360 mul 127 div } def
0 0 moveto
0 40 mm lineto stroke

In most implementations PostScript uses single-precision 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.

See also

  • Adobe Systems
    Adobe Systems
    Adobe Systems Incorporated is an American computer software company founded in 1982 and headquartered in San Jose, California, United States...

  • Ghostscript
    Ghostscript
    Ghostscript is a suite of software based on an interpreter for Adobe Systems' PostScript and Portable Document Format page description languages.- Features :...

  • Portable Document Format
    Portable Document Format
    Portable Document Format is an open standard for document exchange. This file format, created by Adobe Systems in 1993, is used for representing documents in a manner independent of application software, hardware, and operating systems....

  • Document Structuring Conventions
  • Vector graphics
    Vector graphics
    Vector graphics is the use of geometrical primitives such as points, lines, curves, and shapes or polygon, which are all based on mathematical expressions, to represent images in computer graphics...

  • Typeface
    Typeface
    In typography, a typeface is the artistic representation or interpretation of characters; it is the way the type looks. Each type is designed and there are thousands of different typefaces in existence, with new ones being developed constantly....

  • Computer font
    Computer font
    A computer font is an electronic data file containing a set of glyphs, characters, or symbols such as dingbats. Although the term font first referred to a set of metal type sorts in one style and size, since the 1990s it is generally used to refer to a scalable set of digital shapes that may be...

  • Encapsulated PostScript
    Encapsulated PostScript
    Encapsulated PostScript, or EPS, is a DSC-conforming PostScript document with additional restrictions which is intended to be usable as a graphics file format...

  • Reverse Polish notation
    Reverse Polish notation
    Reverse Polish notation is a mathematical notation wherein every operator follows all of its operands, in contrast to Polish notation, which puts the operator in the prefix position. It is also known as Postfix notation and is parenthesis-free as long as operator arities are fixed...

  • PostScript Printer Description
    PostScript Printer Description
    PostScript Printer Description 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 used to invoke features for the print job...

  • InterPress
    InterPress
    InterPress is a page description language developed at Xerox PARC, based on the Forth programming language and an earlier graphics language called JaM...

  • PCL
    Printer Command Language
    Printer Command Language, more commonly referred to as PCL, is a page description language developed by Hewlett-Packard as a printer protocol and has become a de facto industry standard. Originally developed for early inkjet printers in 1984, PCL has been released in varying levels for thermal,...

  • TeX
    TeX
    TeX is a typesetting system designed and mostly written by Donald Knuth and released in 1978. Within the typesetting system, its name is formatted as ....

  • LaTeX
    LaTeX
    LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK