PostScript

from Wikipedia, the free encyclopedia
PostScript
File extension : .ps
MIME type : application / postscript
Magic number : %!
Developed by: Adobe Inc.
Expanded to: Encapsulated PostScript



PostScript is a page description language that was developed by Adobe Inc. in the early 1980s . It is usually used as a vector graphic format for documents and printers , but is also a Turing-complete , stack-oriented programming language . PostScript is a further development of Interpress .

history

The ideas for Postscript came from John Warnock's over 10 years of work . John Warnock initially worked at Evans & Sutherland, then at Xerox at PARC (Palo Alto Research Center). When Warnock saw no prospects for commercial use by Xerox, he founded Adobe Systems Inc. together with Charles Geschke in 1982.

distribution

Popular sample document: tiger.eps (1990) (here as svg)

PostScript has become a standard in the printing industry over the years, but has been largely superseded by the Portable Document Format (PDF), which was also developed by Adobe and has adopted or improved many of the properties of PostScript.

Desktop publishing programs usually have a PostScript export function. In practice, however, PostScript code can be generated from any application (for example from any word processing program ) with the help of a PostScript printer driver, which can either be sent directly to a postscript-capable output device or written to a file. Individual pages or graphics in PostScript format can also be imported by desktop publishing programs and some other applications in the form of encapsulated PostScript files.

In Unix-like operating systems it is common for application programs to send print jobs in PostScript to the print server or the local printing system . This converts the PostScript data, usually with the help of Ghostscript , into device-specific code.

functionality

Graphics and print pages are created as files in PostScript format so that they can be output on a wide variety of output devices in any size and resolution without loss. For this purpose, graphic elements and fonts are described as scalable vector graphics . Raster graphics can also be embedded; they are rescaled depending on the resolution of the output device.

PostScript is a Turing-complete programming language . It is stack-oriented and works on the principle of the reverse Polish notation . The model was the Forth programming language . PostScript-capable output devices (especially printers and printing machines ) are equipped with a Raster Image Processor (RIP), so an interpreter in hardware or software-based feature, the program PostScript evaluates the piece by piece and converts it into a raster graphic (see Postscript Print raster ). This sequential execution of commands means that PostScript files do not have direct access to individual pages. The Ghostscript software offers a free software implementation of such an interpreter .

A sample program

A program example is:

%!
/Courier findfont    % Schrift auswählen
20 scalefont         % auf Schriftgröße 20 skalieren
setfont              % zum aktuellen Zeichensatz machen
50 50 moveto         % (50, 50) als aktuelle Schreibposition setzen
(Hallo Welt!) show   % und dort den Text ausgeben

showpage             % Seite ausgeben

The program writes “Hello world!” At position 50.50.
If the coordinate system has not been changed, it starts at the bottom left.

PostScript level

The functionality of PostScript has been expanded twice. With one exception, the extensions are backwards compatible .

Level 2

Postscript Level 2 is a fully backward-compatible extension of the PostScript specification that works faster and more reliably than Level 1. For example, support for embedded JPEG image data has been added. Some additional functions were introduced with regard to the interactive use with Display PostScript , especially the so-called "Insideness Testing", which can be used to check whether, for example, a point ("mouse click") lies within a path.

PostScript 3

This version was released in 1997. Adobe removed the "Level" part of the name in favor of a simpler name. An important extension is a new color model called DeviceN , which should guarantee the most precise colors possible on all output devices. The DeviceN model supports the mapping of hexachrome or duplex colors, which up to now could only be implemented with pages that were already separated into individual color separations.

Display Postscript

The NextStep operating system also used PostScript as a so-called display PostScript for screen display.

The Quartz graphics system used in Mac OS X , which can be understood as the successor to Display PostScript, uses a graphics model that is based on PDF and implements a subset of PDF 1.2. Programs that use Quartz for their graphic output can easily create PDF files. Quartz does not directly support the PDF transparency function; Mac OS X handles transparent objects in a different way.

PDF features such as hypertext and forms are also implemented differently in programs that use Quartz than in the PDF standard, so that one cannot speak of complete compatibility with PDF.

Fonts

PostScript uses its own font formats, the glyphs of which are described with PostScript and which differ in particular from the TrueType format common on Apple and Windows platforms .

PostScript and PDF

The Portable Document Format (PDF), also developed by Adobe, is based on PostScript. The main differences to PostScript are that PDF is much more strictly structured and is not a programming language (see Adobe PDF Reference 1.7, e.g. page 45 or page 166). PDF ensures, for example, that any page of a PDF document can be accessed in a targeted manner. In PostScript this requires interpreting the program code of all preceding pages beforehand.

PostScript's graphic model was adopted and expanded in PDF. Any PostScript files can therefore be converted into PDF files without losing any graphic information. Conversely, this is only possible if the PDF document dispenses with elements that are missing in PostScript, such as transparency. In addition, PDF can contain fillable forms, pop-up comments, video and audio material, semantic tags, and other elements that go beyond PostScript's functionality.

history

  • PostScript Level 1: 1984
  • Display PostScript : 1988
  • PostScript Level 2: 1991
  • PostScript 3: 1997

Related languages ​​and formats

literature

  • Adobe Systems, Inc. (Ed.): PostScript language tutorial and cookbook (The blue Book). Addison-Wesley, Reading, Massachusetts 1985, ISBN 0-201-10179-3 ( www-cdf.fnal.gov PDF).
  • Adobe Systems, Inc. (Ed.): PostScript language reference. Addison-Wesley, Boston 1999, ISBN 0-201-37922-8 ( adobe.com PDF).
  • Susanne Dotzauer: PostScript (quick overview PC). Markt und Technik, Haar 1991, ISBN 3-89090-995-7 .
  • Tobias Weltner: The big book on Post-Script (with sample programs on disk). Data-Becker, Düsseldorf 1991, ISBN 3-89011-379-6 .
  • Ingo Klöckl: PostScript. Introduction - workshop - reference. (Hanser-Programmier-Praxis; with CD-ROM, contains a comprehensive toolkit, preconfigured for 11 systems), Hanser, Munich / Vienna 1995, ISBN 3-446-18381-7 .
  • Thomas Merz, Olaf Drümmer : The PostScript & PDF Bible. PDFlib GmbH, Munich 2002, ISBN 3-935320-01-9 ( ftp.buerliag.ch PDF).
  • Ross Smith: PostScript. Commands, special effects, batch programming . tewi, Munich 1991, ISBN 3-89362-068-0 .

Web links

Individual evidence

  1. ^ William E. Kasdorf (Ed.): The Columbia Guide to Digital Publishing . Columbia University Press , 2003, ISBN 978-0-231-12499-7 , pp. 228 f . ( limited preview in Google Book search).
  2. Interview with Chuck Warnock . In: InfoWorld . InfoWorld Media Group, Inc., 1989, ISSN  0199-6649 , p. 52 ( books.google.com ).
  3. Federico Biancuzzi: Designed to last ... In: Visionaries of programming: languages ​​and their creators . O'Reilly, 2009, ISBN 978-3-89721-934-2 , pp. 402 ( books.google.com - no page view).
  4. Thomas Merz; Olaf Drümmer : The Postscript & PDF Bible. 2002, p. 18.