This article needs additional citations for verification .(January 2019) |
Paradigm | Multi-paradigm: concatenative (stack-based), procedural |
---|---|
Designed by | John Warnock, Chuck Geschke, Doug Brotz, Ed Taft, Bill Paxton |
Developer | Adobe Systems |
First appeared | 1982 |
Stable release | PostScript 3 / 1997 |
Typing discipline | Dynamic, weak |
Major implementations | |
Adobe PostScript, TrueImage, Ghostscript | |
Influenced by | |
Mesa, [1] Interpress, Lisp | |
Influenced | |
Filename extension | .ps |
---|---|
Internet media type | application/postscript |
Uniform Type Identifier (UTI) | com.adobe.postscript |
Magic number | %! |
Developed by | Adobe Systems |
Type of format | printing file format |
Extended to | Encapsulated PostScript |
PostScript (PS) is a page description language and dynamically typed, stack-based programming language. It is most commonly used in the electronic publishing and desktop publishing realm, but as a Turing complete programming language, it can be used for many other purposes as well. PostScript was created at Adobe Systems by John Warnock, Charles Geschke, Doug Brotz, Ed Taft and Bill Paxton from 1982 to 1984. The most recent version, PostScript 3, was released in 1997.
The concepts of the PostScript language were seeded in 1976 by John Gaffney at Evans & Sutherland, [2] [3] [4] a computer graphics company. At that time, Gaffney and John Warnock were developing an interpreter for a large three-dimensional graphics database of New York Harbor.
Concurrently, researchers at Xerox PARC had developed the first laser printer and had recognized the need for a standard means of defining page images. In 1975–76 Bob Sproull and William Newman developed the Press format, which was eventually used in the Xerox Star 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 [2] [5] (for "John and Martin") which was used for VLSI 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 created a simpler language, similar to Interpress, called PostScript, which went on the market in 1984.
Meanwhile, in the spring of 1983, Steve Jobs came to visit Adobe and was dazzled by PostScript's potential, especially for the new Macintosh computer he was developing at Apple. [6] To John Sculley's frustration, Jobs licensed the PostScript technology from Adobe by offering a $1.5 million advance against PostScript royalties, plus $2.5 million in exchange for 20 percent of Adobe shares. [7] During a series of meetings in 1983, Jobs also repeatedly offered for Apple to buy Adobe outright, but the founders kept turning him down. [7] In December 1983, the two companies finally signed off on the PostScript licensing deal, and Adobe had to shift focus immediately from high-end, high-resolution printing devices to the consumer-oriented Apple LaserWriter laser printer. [8]
At that time, the 300-dpi Canon laser printing engine to be used in LaserWriters was seen as good enough only for proof printing (i.e., for crude rough drafts of material whose final drafts would be sent to professional high-resolution devices), but Jobs presented Adobe with the challenge of making PostScript render high-quality output to such a low-resolution device (which for most consumers would be their only printing device). [9] In response, Warnock and Brotz solved the so-called "appearance problem" of making the stem width of letters scale properly so that they look good at all resolutions. [10] Their breakthrough was so important that Adobe has never patented the technology, in order to keep its details concealed as a trade secret. [10] Paxton worked on several other related improvements, such as font hinting. [10] Adobe was also responsible for porting PostScript to the Canon's Motorola 68000 chip. [10]
Apple and Adobe announced the LaserWriter at Apple's annual stockholder meeting on January 23, 1985. [11] It was the first printer to ship with PostScript, sparking the desktop publishing (DTP) revolution in the mid-1980s. [12] The original PostScript royalty was five percent of the list price for each laser printer sold, which was $350 of the original LaserWriter list price of $6,995, and such royalties provided nearly all of Adobe's income during its early years. [13] (Apple later renegotiated the contract to pay a licensing fee based on volume of printers shipped.) [13] The combination of technical merits and widespread availability made PostScript the language of choice for graphical output for printing applications. An interpreter (sometimes referred to as a RIP for Raster Image Processor) for the PostScript language was a common component of laser printers during the 1980s and 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 microprocessors and ample memory. The LaserWriter used a 12 MHz Motorola 68000, making it faster than any of the Macintosh computers to which it was attached. [14] 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 during the 1990s than their attached printers, it no longer made sense to offload the rasterization work onto the resource-constrained printer. By 2001, few low-end printer models came with onboard support for PostScript, largely due to growing competition from much cheaper non-PostScript inkjet printers, and new software-based methods to render PostScript images on computers, making them suitable for any printer. PDF, a descendant of PostScript, provides one such method, and has largely replaced PostScript as the de facto 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.
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 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, and the form mechanism for caching reusable content.
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 that allowed the addition of additional ink colors (called spot colors) into composite color pages.
Prior to the introduction of Interpress and PostScript, printers were designed to print character output given the text—typically in ASCII —as input.[ citation needed ] There were a number of technologies for this task, but most shared the property that the glyphs were physically difficult to change, as they were stamped onto typewriter keys, bands of metal, or optical plates.
This changed to some degree with the increasing popularity of dot matrix printers. 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 sequences. These printer control languages varied from printer to printer, requiring program authors to create numerous drivers.
Vector graphics printing was left to special-purpose devices, called plotters. Almost all plotters shared a common command language, HPGL, but were of limited use for anything other than printing graphics. In addition, they tended to be expensive and slow, and thus rare.
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 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: 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 which everything, even text, is specified in terms of straight lines and cubic Bézier curves (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 occasionally called PostScript raster image processors, or RIPs.
Almost as complex as PostScript itself is its handling of fonts. The font system uses the PS graphics primitives to draw glyphs as curves, which can then be rendered at any resolution. A number of typographic 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, 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 (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.
The Type 2 font format was designed to be used with Compact Font Format (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 fonts.
The CID-keyed font 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, around 1991. Immediately following the announcement of TrueType, Adobe published the specification for the Type 1 font format. Retail tools such as Altsys Fontographer (acquired by Macromedia 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 typesetting system are available in this format.
Effective January 2023, support for Type 1 fonts has ended. [15]
In the early 1990s, there were several other systems for storing outline-based fonts, developed by Bitstream 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, 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.
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 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, and Apple licensed to Microsoft its new font format, TrueType. 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's IPS PS3 [16] interpreter, formerly known as PhoenixPage, is standard in many printers and MFPs, including those developed by Hewlett-Packard and sold under the LaserJet and Color LaserJet lines. Other third-party PostScript solutions used by print and MFP manufacturers include Jaws [17] and the Harlequin RIP, both by Global Graphics. A free software version, with several other applications, is Ghostscript. Several compatible interpreters are listed on the Undocumented Printing Wiki. [18]
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.'s T-Script or Brother's BR-Script3.
PostScript became commercially successful due to the introduction of the graphical user interface (GUI), allowing designers to directly lay out pages for eventual output on laser printers. However, the GUIs' own graphics systems were generally much less sophisticated than PostScript; Apple's QuickDraw, 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, he pitched Adobe on the idea of using PS as the display system for his new workstation computers. The result was Display PostScript, 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 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 took another approach, creating NeWS. 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 system led to its introduction and widespread use on Sun systems, and NeWS never became widely used.
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. [19] : 9
PostScript is a Turing-complete programming language, belonging to the concatenative group of programming languages. It is an interpreted, stack-based language similar to Forth but with strong dynamic typing, data structures inspired by those found in Lisp, scoped memory and, since language level 2, garbage collection. The language syntax uses reverse Polish notation, 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 so that all devices will properly interpret it as PostScript.
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. [20]
A Hello World program, 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 font20selectfont% choose the size in points and establish % the font as the current one72500moveto% position the current point at % coordinates 72, 500 (the origin is at the % lower-left corner of the page)(Hello world!)show% paint the text in parenthesesshowpage% print all on the page
or if the output device has a console
%!PS(Hello world!)=
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:
00moveto0113.385827rlinetostroke
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{72mul2.54div}def% 1 inch = 2.54 cm exactly00moveto04cmrlinetostroke
(Technically, most printers have a construction-implied unprintable margin around the physical borders of the sheet, and the 0 0 coordinates are calibrated to its corner, [19] : section 4.3.1 so you might have to use a different starting point to actually see something.)
Most implementations of PostScript use single-precision reals [19] : appendix B (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.
List of software which can be used to render the PostScript documents:
Portable Document Format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems. Based on the PostScript language, each PDF file encapsulates a complete description of a fixed-layout flat document, including the text, fonts, vector graphics, raster images and other information needed to display it. PDF has its roots in "The Camelot Project" initiated by Adobe co-founder John Warnock in 1991. PDF was standardized as ISO 32000 in 2008. The last edition as ISO 32000-2:2020 was published in December 2020.
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. An overlapping term is printer control language, which includes Hewlett-Packard's Printer Command Language (PCL). PostScript is one of the most noted page description languages. The markup language adaptation of the PDL is the page description markup language.
In computer graphics and digital photography, a raster graphic represents a two-dimensional picture as a rectangular matrix or grid of pixels, viewable via a computer display, paper, or other display medium. A raster image is technically characterized by the width and height of the image in pixels and by the number of bits per pixel. Raster images are stored in image files with varying dissemination, production, generation, and acquisition formats.
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 systems.
Vector graphics are 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 and printing hardware, vector data models and file formats, as well as the software based on these data models. Vector graphics are an alternative to raster or bitmap graphics, with each having advantages and disadvantages in specific situations.
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 description in a high-level page description language such as PostScript, PDF, or XPS. The input can also be or include bitmaps of higher or lower resolution than the output device, which the RIP resizes using an image scaling algorithm.
Laser printing is an electrostatic digital printing process. It produces high-quality text and graphics by repeatedly passing a laser beam back and forth over a negatively charged cylinder called a "drum" to define a differentially charged image. The drum then selectively collects electrically charged powdered ink (toner), and transfers the image to paper, which is then heated to permanently fuse the text, imagery, or both to the paper. As with digital photocopiers, laser printers employ a xerographic printing process. Laser printing differs from traditional xerography as implemented in analog photocopiers in that in the latter, the image is formed by reflecting light off an existing document onto the exposed drum.
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 PageMaker that operated on top of the graphical user interface of Macintosh computers, the LaserWriter was a key component at the beginning of the desktop publishing revolution.
Desktop publishing (DTP) is the creation of documents using dedicated 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 content. Desktop publishing software can generate page layouts and produce text and image content comparable to the simpler forms of traditional typography and printing. This technology allows individuals, businesses, and other organizations to self-publish a wide variety of content, from menus to magazines to books, without the expense of commercial printing.
Display PostScript is a 2D graphics engine system for computers that uses the PostScript (PS) imaging model and language to generate on-screen graphics. To the basic PS system, DPS adds a number of features intended to ease working with bitmapped displays and improve performance of some common tasks.
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 files, for the display or printing of document pages, and the conversion between PostScript and PDF files.
Typesetting is the composition of text for publication, display, or distribution by means of arranging physical type in mechanical systems or glyphs in digital systems representing characters. Stored types are retrieved and ordered according to a language's orthography for visual display. Typesetting requires one or more fonts. One significant effect of typesetting was that authorship of works could be spotted more easily, making it difficult for copiers who have not gained permission.
In computers, a printer driver or a print processor is a piece of software on a computer that converts the data to be printed to a format that a printer can understand. The purpose of printer drivers is to allow applications to do printing without being aware of the technical details of each printer model.
QuickDraw GX was a replacement for the QuickDraw (QD) 2D graphics engine and Printing Manager inside the classic Mac OS. Its underlying drawing platform was an object oriented, resolution-independent, retained mode system, making it much easier for programmers to perform common tasks. Additionally, GX added various curve-drawing commands that had been lacking from QD, as well as introducing TrueType as its basic font system.
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 printing, is a screen font.
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 printers in 1984, PCL has been released in varying levels for thermal, matrix, and page printers. HP-GL/2 and PJL are supported by later versions of PCL.
In printing, Preflight is the process of confirming that the digital files required for the printing process are all present, valid, correctly formatted, and of the desired type. The basic idea is to prepare the files to make them feasible for the correct process such as offset printing and eliminate costly errors and facilitate a smooth production. It is a standard prepress procedure in the printing industry. The term originates from the preflight checklists used by pilots. The term was first used in a presentation at the Color Connections conference in 1990 by consultant Chuck Weger, and Professor Ron Bertolina was a pioneer for solutions to preflighting in the 1990s.
Apple's Macintosh computer supports a wide variety of fonts. This support was one of the features that initially distinguished it from other systems.
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.
"Harlequin (software)" is a raster image processor first released in 1990 under the name ScriptWorks running as a command-line application to render PostScript language files under Unix. It was developed by Harlequin, a software company based in Cambridge, England.