Home >> Computers >> Data Formats >> Document >> Publishing >> PostScript




PostScript (PS) occurs as page description language used primarily in the electronic and desktop publishing areas.

History
A conception of the PostScript language were seeded within 1976 when John Warnock was working at Evans and Sutherland, a renowned computer graphics company. At that instance John Gaffney was getting an interpreter for the big 3-cubic graphics database of New York harbour. Gaffney conceived a Project Models language to run a graphics, super similar to the Forth programming language.

Around 1978 Evans and Sutherland asked Warnock to move from either a San Francisco bay area to their independent headquarters inside Utah, but he was non interested around moving. He so joined Xerox PARC to work using Martin Newell. It rewrote Project Models to produce JaM (John & Martin) which was utilized for VLSI design & a investigation of nature and severity and graphics printing. This act late evolved into an expanded rules called InterPress.

Fallowing watching Xerox sit in InterPress, when it experienced by having several of their more technologies, Warnock left sustaining Chuck Geschke and founded Adobe Systems in December 1982. It created the simpler language, similar to InterPress, known as PostScript, which went on the market inside 1985. At all about this period it were visited by Steve Jobs, who urged a babies to adapt PostScript to exist when utilized as the language for camping laser printers, which was added to a Canon printing engine to create a LaserWriter.

Inside March of 1985, the Apple LaserWriter was a foremost printer to ship sustaining PostScript, sparking the desktop publishing (DTP) revolution in the mid-1980s. the combination of technical indicator merits & far flung availableness processed PostScript a language of selection for in writing output for printing applications. For the instance an interpreter for this language was a omnipresent component of laser printers, into the 1990s.

It used to be that a de facto standard for electronic distribution of final documents, PostScript has effectively been succeeded by PDF in this area. By 2001 there were fewer printer models which come sustaining trend lines for PostScript, largely following of the increasing power of the built-inherent printing systems supplied using virtually all operating systems. a utilise of a PostScript optical maser printer does, all a same, significantly reduce the CPU workload taking part inside printing documents, & does allow typeset-quality printing forswearing the require for printer-specific drivers.

Usage in printing
Traditional printing
Before a introduction of PostScript, printers were designed to print character output given a text—generally inside ASCII—as input. There were a total of technologies for this project, however virtually all shared a property that the characters were physically difficult to vary, when it were stamped onto typewriter keys, bands of metal, or even optical plates.

This changed to a select few degree by owning a increasing popularity of dot matrix printers. A characters in these systems were "drawn" as a series of dots, a proper dots to have defined as a font table inside a printer. When it grew withinherent sophistication, dot matrix printers began including many built-in fonts from either which a user can choose, & a few system allowed a user to download their have custom character graphics into a printer.

Dot matrix printers besides introduced a ability to print raster graphics. the graphics were interpreted per computer & sent as a series of dots to the printer applying a series of escape sequences. These printer control languages varied from printer to printer, requiring program authors to produce many drivers.

"Real" graphics printing was left to favorite-purpose hardware, known as plotters. Plotters did part the most common command language, HPGL, but were of limited utilize for love or money otherwise printing graphics. Additionally, it tended to become expensive & slow, & so uncommon.

PostScript printing
PostScript broke tradition by combining a better features of two printers & plotters. Such as plotters, PostScript offered the high quality line art & one control language that can be utilized through any brand of printer. Rather dot-matrix printers, PostScript offered elementary ways to generate places of text & raster graphics. Unlike either, PostScript can place completely one types of media in one web page, which offered far supplementary flexibility than any printer or even plotter antecedently experienced.

PostScript went beyond the average printer control language, & was a complete programming language of its own. Numerous applications might transform the document into the PostScript program whose execution might symptom in the original document. This program may be sent to an interpreter within a printer, which results in a printed document, or even to of these within an additional applicatiin, which might display the document on-screen. Since a document-program is the equivalent irrespective of its destination, these are known as device-independent.

PostScript is likewise noteworthy for implementing in-a fly rasterization; everything, possibly text, is specified around terms of straight lines & three-dimensional Bézier curves (previously encountered exclusively within CAD applications), which allows arbitrary scaling, rotating and more transformations. Whenever a PostScript program is interpreted, a interpreter converts these instructions into a dots required to form a output.

Font handling
Most when complex when PostScript itself was PS's treating of fonts. A rich font rules utilized a PS graphics primitives to draw characters when line art, which could so become rendered at any resolution. This may healthy prefer the reasonably straightforward construct, however there are the total of typographical issues that got to become considered.

A single is that fonts don't actually shell linearly at little sizes; features of the characters might get proportionately overlarge or even little & it run to "look wrong." PostScript avoided this condition by having a inclusion of hints which can be economised along sustaining a font outlines. Au fond it is extra reference witharound horizontal or even vertical elastic that facilitate identify a features in every letter that come crucial for the rasterizer to maintain. A effect was significantly better-good-looking fonts potentially at moo guide; it was erst believed that hand-tuned electronic image fonts were needed for this project.

At the instance a technology for including these hints inside fonts was carefully guarded, & a hinted fonts were compressed & encrypted into what Adobe known as a Nature and severity One Font. Nature and severity One wwhen profits the simplification of the PS formulas to store outline reference lone, as opposed to existence the complete language (PDF is similar therein regard). Adobe would so sell licenses to the Nature and severity One technology at the super high dollars and cents to people wanting to add hints to their have fonts. Victims world health organization were happy forswearing hints, or even didn't obviously spend a money, were left sustaining a and so-supposed Nature and severity Three Font. Nature and severity Three fonts provide all a sophistication of the PostScript language, however forgoing the standardized approach to hinting. More differences farther added to the confusion.

A numbers of the licensing was considered by several to become as well high, & Adobe continued to stonewall in additional attractive rates. It was this issue that led Apple to project their have patterns, TrueType, around 1991. Immediately below a announcement of TrueNature and severity, Adobe published a specification for Type One fonts. Retail information like Altsys Fontographer (now owned by Macromedia) added the ability to produce Nature and severity One fonts. Since so, numbers of loose Nature and severity One fonts use been freed; e.g., a fonts utilized sustaining a TeX typesetting system come available therein format.

In the early 1990s there were several more systems for storing outline-depending fonts, developed by Bitstream and Metafont for instance, but none involved the general-all-purpose printing guide & it were so non widely utilized following.

Other implementations
In the Eighties, Adobe had virtually all of their revenue from either either licensing fees from their implementation of PostScript for printers, called the raster image processor or RIP. These were fairly expensive, & generally ran in the limited choice of devices. By using the introduction of a total of RISC-based platforms in the mid 1980s, Adoexist as always seemed to be a step behind within supporting the newly machines.

Third-person implementations of PostScript interpreters became quite commons following. These tended to become discovered either within online-low-priced laser printers, or around super high-prevent typesetting devices. Occasionally 1 third-person solutions come however widely utilized in a typesetting globe, particularly the one developed by Phoenix Systems (Phoenix Page) that is standard in all black-&-white Hewlett-Packard optical maser printers (as of 2005).

All the same, several printers don't trend lines any RIP in their basic versions. For these, the free PostScript interpreter called Ghostscript is available. It prints PostScript documents in non-PostScript printers using the CPU of a host computer to wash a rasterization, sending the symptom as a only big electronic image to the printer. It can as well become utilized to preview PostScript documents in the computer monitor, & to convert PostScript web sites into numerous raster graphics and vector formats like TIFF, PNG, PDF, and so in.

Usage as a display system
By using PostScript becoming a de-facto standard for printed output, it was natural to assume using the equivalent language for describing the screen output as well. A rapid increase around CPU power in the late 1980s, combined with an interest around windowing systems, led to many tries to produce the display formulwhen that utilized PostScript as its primary display technology.

There are a total of benefits to applying PS when the display rules. One is that a fonts in more systems compulsory a user to keep non just bitmaps for the screen, however as well Nature and severity 1 for the printer. Utilizing PS on the display would eliminate this & involve sole 1 placed. An additional benefit is that it allows for the "dumbing down" of printers. Once a LaserWriter was freed it was a virtually all mighty (& expensive) machine inside Apple's lineup, the symptom of looking for considerable processing power & memory to render the report at a "high" guide of 300 dpi in a reasonable total of instance. Inside direct contrast, a 400-dpi printer that shipped using a NeXT platform contained no CPU the least bit, instead using the computer's CPU to wash a giving & passing a rendered site as a bitmap to the printer.

However a independent benefit in PostScript as a windowing models is that it allows of these to write desktop publishing (DTP) and more graphically-intensive applications using one placed of graphics routines. A equivalent code that is drawing to the window may be utilized to draw to the printer forgoing any translation. DTP applications in traditional systems necessitate a software engineer to construct a GUI editor in the platform's own graphics technique (e.g., QuickDraw on the Macintosh, or GDI on Microsoft Windows) and then write extra code to translate a graphics into proper PostScript for printing. This typically requires higher a majority of the programming effort in such projects & occurs as major source of bugs.

Them independent examples of PostScript as a display technology come Display PostScript (DPS) and NeWS. It differed dramatically inside terms of around which a display logic was applied; around DPS a watch models was left to a hosting OS, whereas under NeWS the entire display was written around PS & ran in one complex interpreter. Spell sure enough super interesting, it's non clear that NeWS is as the matter of fact a better approach.

The language
PostScript occurs as good-fledged, Turing-complete, programming language. Occasionally, PostScript software download are non by man, however by more computer software. But, these are perfectly imaginable to create graphics or even to perform calculations by hand-crafting PostScript software online.

PostScript is an interpreted, stack-based language (i.e. stack language) similar to Forth. A language syntax utilizes reverse Polish notation, which makes parentheses unnecessary, however reading a program takes a bit of practice, because 1 has to keep the layout of the fold within mind. Virtually all operators (what more languages term functions) choose their arguments from either a fold, & place their effects onto a fold. Literals (for example statistics) use the burden of placing a copy of themselves on the fold.

Case:

Three Four add Five One sub mul

might compute (Troika + Four) * (Five - One).

The view what happens around detail:

Three & Four come two erratum, and then might click themselves onto a fold. And then when these 2 videos, a fold may look prefer this:

4 3

add is an operator, ingesting a two top-uppermost elements from either a fold (Three & Fmy within our case), adds them together, & pushes a effect onto the fold:

7

Next came deuce misprint once again, which will make a fold look rather this (note that action is ordinarily forced to the top of the fold, allowing moo elements unchanged):

1 5 7

An additional operator, sub, will require 2 elements from either either a top, subtracts a foremost (higher 1) from a 2nd, & pushes a symptom onto a fold:

4 7

It should exist as perceptible that mul works prefer a more operators, ingesting its deuce arguments from either a fold, & pushing their product:

28

However this did nothing to a higher degree an old RPN calculator. Naturally, PostScript has variables. Within detail, it has the lexicon within which all about that is nin a literal error is consult; on a match, the todays value stored under the title is pushed; mismatches may effect in an error. To place something in a lexicon 1 needs the def operator, which will require the title & the value when its arguments. List come constructed by prefixing (or even quoting) using the slash. So

/x1 Xv def

may number 1 click a title "x1" on a fold, so the value Xv, so execute def which may require each from either a fold, & write Xv into a lexicon under a title "x1". Late occurrences of "x1" (does'nt to become confused sustaining "/x1") might click Fifteen onto a fold when hanker when a variable is unchanged. This code might increment the content of x1 by Ii:

/x1 x1 Ii add def

A few very programming language power is offered by ''''. A opening brace puts a interpreter inside postponed execution mode, & then that all about is upright laid on the fold, potentially operators and more feasible objects. A of these exception is a closing brace, which will require all about wear a fold since the opening brace, bundles it higher into an (anon.) procedure, & pages that on the fold.

This construct is utilized inside various ways, for subprogram definition (the anon. procedure is assigned to a variable), loops, conditionals, etc. Case:

x1 Cypher combining weight ifelse

This code 1st utilizes a combining weight operator to line 2 text whether a value of x1 is capable Nought; based on the effect equivalent weight may click admittedly or even faithlessly onto a fold. Fallowing that, ii procedures come pushed onto a fold. So ifelse is executed, which may require trinity arguments from either a fold, & will execute either a 2nd (whenever a third is confessedly) or even number 1 (whenever a third is treacherously). Around sum-up, Cypher resolutions in case x1 is Zero, 1/x1 is the symptom for tons more lawsuits.

/incThreesome def

On text def is utilized to place something in the dictionary, only this period these are the procedure instead of the elementary whole number. This works because a values from either a lexicon come executed'', non upright pushed (when simplistically declared above). Since death penalty the typographical error numbers to pushing it, that did non produce the difference prior to. Nowadays executing "inc3" might number one look it higher in a lexicon, locate the procedure object representing "" & execute that. Of these value must reside on the fold for this to act, since add needs 2 arguments, merely one of which is given in the procedure itself. Naturally, 1 lives arguments to procedures by placing the children on the fold, thus you potty only look at "inc3" as a procedure that requires 1 argument. Case call for:

71 inc3

might put 71 on the fold, which inc3 might increment by trinity, for the resultant of 74.

To develop graphics, PostScript utilizes an average cartesian coordinate system.

100 200 moveto 300 400 lineto stroke

moves a "cursor" pertinent using co-ordinate (Centred, 200) and so draw the line pertinent (300, 400).

50 70 moveto 100 200 50 80 100 100 curveto stroke

green goods the three-dimensional Bézier curve from (Fifty, Lxx) to (One c, C) by using control points (Hundred, 200) & (50, Eighty).

250 250 moveto (Wikipedia) show

might produce a text "Wikipedia" at coordinate location (250, 250), rendered inside the preselected font (utilizing the imaginable command string like /Courier findfont Dozen scalefont setfont)

Graphics come at first produced in the "user coordinate system" and may so optionally exist as rotated, scaled or even skewed prior to existence copied to the "device coordinate system" specifying the final output.

200 300 translate 45 rotate

may translate a table of contents of the user coordinate formulas 200 points upwards, 300 points to the best & rotate it 45 degrees prior to it is copied to the device coordinate models.

A character "%" is utilized to introduce comments around PostScript computer program. As a general convention, each PostScript program should begin by owning a characters "%!" thus that completely equipment may properly interpret it when PostScript.

Adobe PostScript
The official site of PostScript has, among others, the PostScript Language Reference. (Adobe)

Richard's PS Junk Page
PostScript news, downloads, documentation.

PostScript Introduction
An overview of the PostScript page description language, where it came from, and the problem that it solves.

PostScript and GhostScript Resources
Links to general information, utilities, and software.

A First Guide to PostScript
A tutorial of the basics of the PostScript page description language. Includes examples.

PostScript Language Reference
Complete list of PostScript operators, operands, and symbols. Also features a PostScript troubleshooting section, information on document structuring conventions, the OpenPress Interface (OPI) specification, and a list of books.

EPS in Ten Easy Stages
Brief introduction to Encapsulated PostScript.

PostScript Books
Lists a couple of Adobe and third-party publications.

PostScript Programming Tutorial
Step-by-step guide to writing PostScript programs by DevCentral Learning Center. Site registration (free) is required to view this guide.


Computers: Programming: Languages: Postscript






© 2005 GeneralAnswers.org