PostScript: Perbezaan antara semakan
Baris 86: | Baris 86: | ||
== Lihat juga == |
== Lihat juga == |
||
{{wikibooks| |
{{wikibooks|Soalan lazim PostScript}} |
||
* [[Adobe Systems]] |
* [[Adobe Systems]] |
Semakan pada 11:26, 25 September 2009
Fail:PostScript 3.svg | |
Paradigma | Berbilang paradigma: berasaskan tindanan, tatacara |
---|---|
Muncul pada | 1982 |
Direka oleh | John Warnock & Chuck Geschke |
Pembangun | Adobe Systems |
Lepasan stabil | PostScript 3 (1997) |
Disiplin penjenisan | Dinamik, kuat |
Pelaksanaan utama | Adobe PostScript, TrueImage, Ghostscript, InterPress |
Dipengaruhi | Lisp |
Mempengaruhi |
PostScript | |
---|---|
Sambungan fail: | .ps |
Jenis media Internet: | application/postscript |
Pengecam Jenis Seragam: | com.adobe.postscript |
Magik: | %! |
Dibangunkan oleh: | Adobe Systems |
Jenis format: | Format fail pencetakan |
Diperluas kepada: | PostScript Berkapsul |
PostScript (PS) is a dynamically typed concatenative programming language created by John Warnock and Charles Geschke in 1982. PostScript is best known for its use as a page description language in the electronic and desktop publishing areas.
Sejarah
The concepts of the PostScript language were seeded in 1976 when John Warnock was working at Evans & Sutherland, a famous computer graphics company. At that time John Warnock was developing an interpreter for a large three-dimensional graphics database of New York harbor. Warnock conceived the Design System language to process the graphics.
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 a team led by Bob Sproull 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 Evans and Sutherland asked Warnock to move from the San Francisco Bay Area to their main headquarters in Utah, 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 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 created a simpler language, similar to InterPress, called PostScript, which went on the market in 1984. At about this time they were visited by Steve Jobs, who urged them to adapt PostScript to be used as the language for driving laser printers.
In March 1985, the Apple LaserWriter was the first printer to ship with PostScript, sparking the desktop publishing (DTP) revolution in the mid-1980s. The combination of technical merits and widespread availability made PostScript a language of choice for graphical output for printing applications. For a time an interpreter (sometimes referred to as a RIP for Raster Image Processor) for the PostScript language was a common component of laser printers, into the 1990s.
However, the cost of implementation was high; computers output raw PS code that would be interpreted by the printer into a raster image at the printer's natural resolution. This required high performance microprocessors and ample memory. The LaserWriter used a 12 MHz Motorola 68000, 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 worthwhile, but as printer mechanisms fell in price, the cost of implementing PS became increasingly expensive.
Once the de facto 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. 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. PS is still an option on most "high end" models.
The language
PostScript is a Turing-complete programming language, belonging to the concatenative group. Typically, PostScript programs are not produced by humans, but by other programs. However, it is possible to write computer programs in PostScript just like any other programming language.
PostScript 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 "%!" so that all devices will properly interpret it as PostScript.
"Hello world"
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:
%!PS /Courier findfont 20 scalefont setfont 72 500 moveto (Hello world!) show showpage
or if the output device has a console
%!PS (Hello world!) =
Units of length
Postscript uses the point as its unit of length. However, unlike some other versions of the point, PostScript uses exactly 72 points to the inch. Thus:
For example, in order to draw horizontal line of 4cm length, it is sufficient to type:
0 0 moveto 0 113.385827 lineto stroke
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. For draft graphics, the number of significant digits may be reduced.
Lihat juga
Wikibuku mempunyai sebuah buku berkenaan topik: PostScript |
- Adobe Systems
- Fon komputer
- Format Dokumen Mudah Alih
- Ghostscript
- Grafik vektor
- InterPress
- Konvensi Pembentukan Dokumen
- Muka taip
- PCL
- Perihal Pencetak PostScript
- PostScript Berkapsul
- Senarai piawai komputer
- Tatatanda Poland songsang
Nota
Rujukan
Rencana ini pada asalnya berdasarkan bahan daripada Free On-line Dictionary of Computing yang dilesenkan di bawah GFDL.
Pautan luar
Wikibuku mempunyai sebuah buku berkenaan topik: PostScript |
- PostScript Language Reference, third edition (PLR3), plus its Supplement, is the de facto defining work, known as "The Red Book" on account of its covers. The first edition covered PostScript Level 1, the second edition covered a greatly expanded language known as PostScript Level 2, and includes documentation for Display PostScript as well. The third edition covers PostScript 3 (with this version, Adobe dropped "level" from the name) but no longer includes DPS.
- PostScript Language Tutorial and Cookbook is the corresponding introductory text, known as "The Blue Book" on account of its covers.
- PostScript language program design is "The Green Book".
- Adobe: PostScript vs. PDF - Official introductory comparison of PS, EPS vs. PDF.
- Adobe: The Type 1 Font Format (PDF file).
- A First Guide to PostScript
- Mathematical Illustrations: A Manual of Geometry and PostScript — a book by Bill Casselman.
- Thinking in PostScript - 1990 by Glenn Reid, Addison-Wesley — available online courtesy of the author. A thorough tutorial.