Difference between revisions of "PostScript"

From Christoph's Personal Wiki
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
'''PostScript''' ('''PS''') is a page description language and programming language used primarily in the electronic and desktop publishing areas.
 
'''PostScript''' ('''PS''') is a page description language and programming language used primarily in the electronic and desktop publishing areas.
 +
 +
==PostScript utilities==
 +
;pstops : shuffle pages in a PostScript file (see manpage for details)
 +
 +
===Examples===
 +
This section contains some sample re-arrangements. To put two pages on one sheet (of A4 paper), the pagespec to use is:
 +
2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)
 +
 +
*Select all of the odd pages in reverse order:
 +
2:-0
 +
 +
*Re-arrange pages for printing 2-up booklets:
 +
4:-3L@.7(21cm,0)+0L@.7(21cm,14.85cm)
 +
for the front sides, and
 +
 +
4:1L@.7(21cm,0)+-2L@.7(21cm,14.85cm)
 +
for the reverse sides.
 +
 +
*convert to two-up:
 +
pstops '4:0L@.67(20cm,1cm)+1L@.67(20cm,15cm),3R@.67(1cm,15.25cm)\
 +
    +2R@.67(1cm,29.25cm)' $*.ps $*.dps
  
 
== External links ==
 
== External links ==
*[[Image:icon_pdf.gif|PDF]][http://partners.adobe.com/public/developer/en/ps/PLRM.pdf ''PostScript Language Reference'', third edition] (''PLR3''), plus its [http://partners.adobe.com/public/developer/en/ps/PS3010and3011.Supplement.pdf ''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.
+
*[[Image:icon_pdf.gif|PDF]][http://partners.adobe.com/public/developer/en/ps/PLRM.pdf ''PostScript Language Reference'', third edition] (''PLR3''), plus its [http://partners.adobe.com/public/developer/en/ps/PS3010and3011.Supplement.pdf ''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.
 
*[[Image:icon_pdf.gif|PDF]][http://www-cdf.fnal.gov/offline/PostScript/BLUEBOOK.PDF ''PostScript Language Tutorial and Cookbook''] is the corresponding introductory text, known as "The Blue Book" on account of its covers.
 
*[[Image:icon_pdf.gif|PDF]][http://www-cdf.fnal.gov/offline/PostScript/BLUEBOOK.PDF ''PostScript Language Tutorial and Cookbook''] is the corresponding introductory text, known as "The Blue Book" on account of its covers.
 
*[http://www.cs.indiana.edu/docproject/programming/postscript/postscript.html ''First Guide to PostScript''] is an introduction to the PostScript system.
 
*[http://www.cs.indiana.edu/docproject/programming/postscript/postscript.html ''First Guide to PostScript''] is an introduction to the PostScript system.
Line 9: Line 30:
 
*[[Image:icon_pdf.gif|PDF]][http://partners.adobe.com/public/developer/en/font/T1_SPEC.PDF The Type 1 Font Format] in PDF form.
 
*[[Image:icon_pdf.gif|PDF]][http://partners.adobe.com/public/developer/en/font/T1_SPEC.PDF The Type 1 Font Format] in PDF form.
 
*[http://www.tgreer.com/printforum/ ''T.Greer PrintForum''], a PostScript programming forum and discussion community.  
 
*[http://www.tgreer.com/printforum/ ''T.Greer PrintForum''], a PostScript programming forum and discussion community.  
* [http://search.cpan.org/~mcnewton/PostScript-Simple-0.07/lib/PostScript/Simple.pm PostScript::Simple] — Produce PostScript files from [[Perl]]
+
*[http://search.cpan.org/~mcnewton/PostScript-Simple-0.07/lib/PostScript/Simple.pm PostScript::Simple] — Produce PostScript files from [[Perl]]
* [[wikipedia:PostScript]]
+
*[[wikipedia:PostScript]]
 +
*[[wikibooks:PostScript FAQ]]
  
 
=== PostScript hacks ===
 
=== PostScript hacks ===
*[http://www.tjhsst.edu/~edanaher/pslife/ Life in PostScript] - a PostScript version of [[Conway's Game of Life]]
+
*[http://www.tjhsst.edu/~edanaher/pslife/ Life in PostScript] - a PostScript version of Conway's Game of Life
 
<!-- *[http://public.planetmirror.com/pub/pshttpd/ PS-HTTPD] - a webserver written in PostScript -->
 
<!-- *[http://public.planetmirror.com/pub/pshttpd/ PS-HTTPD] - a webserver written in PostScript -->
 
*[http://www.pvv.ntnu.no/~andersr/fractal/PostScript.html PostScript fractals]
 
*[http://www.pvv.ntnu.no/~andersr/fractal/PostScript.html PostScript fractals]
 
*[http://www.terryburton.co.uk/barcodewriter/ PostScript barcodes]
 
*[http://www.terryburton.co.uk/barcodewriter/ PostScript barcodes]
 
*[http://www.terryburton.co.uk/htmlrenderer/ PostScript HTML renderer]
 
*[http://www.terryburton.co.uk/htmlrenderer/ PostScript HTML renderer]
*[http://web.umr.edu/~johns/raytracer/rtn/rtnews4a.html#art7 A PostScript raytracer], from ''Ray Tracing News'',  [[September 5]] [[1988]], Volume 1, Number 8.
+
*[http://web.umr.edu/~johns/raytracer/rtn/rtnews4a.html#art7 A PostScript raytracer], from ''Ray Tracing News'', Volume 1, Number 8; 1988-09-05.
  
 
{{stub}}
 
{{stub}}
 
[[Category:Scripting languages]]
 
[[Category:Scripting languages]]
 
[[Category:Graphics software]]
 
[[Category:Graphics software]]

Latest revision as of 01:21, 8 February 2009

PostScript (PS) is a page description language and programming language used primarily in the electronic and desktop publishing areas.

PostScript utilities

pstops 
shuffle pages in a PostScript file (see manpage for details)

Examples

This section contains some sample re-arrangements. To put two pages on one sheet (of A4 paper), the pagespec to use is:

2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)
  • Select all of the odd pages in reverse order:
2:-0
  • Re-arrange pages for printing 2-up booklets:
4:-3L@.7(21cm,0)+0L@.7(21cm,14.85cm)

for the front sides, and

4:1L@.7(21cm,0)+-2L@.7(21cm,14.85cm)

for the reverse sides.

  • convert to two-up:
pstops '4:0L@.67(20cm,1cm)+1L@.67(20cm,15cm),3R@.67(1cm,15.25cm)\
    +2R@.67(1cm,29.25cm)' $*.ps $*.dps

External links

PostScript hacks

This article is curently a "stub". This means it is an incomplete article needing further elaboration.

I always welcome suggestions, comments, and criticism. If you have something to contribute to this site, please follow this link: Contributing Information. Thank you!