//feiri.de/pcan/


A PostScript interpreter for the HTML5 Canvas element


Born out of an academic exercise to learn the PostScript language, PostCanvas has grown into a decent interpreter of the PostScript language. It was built as a set of JavaScript routines that implement a stack machine to interpret plain PostScript code. The results get rendered/rasterized to the screen through the HTML5 canvas element.

PostCanvas served me well as an enjoyable way to learn the basics of stack machines and vector image construction as used in PostScript. I tend to revisit it from time to time to enjoy to simplicity of programming stack machines or to benchmark JavaScript engines. The code was moved it to its own PostCanavas project page at Google Code. In case anyone wants to use it, play with it, learn with it, or extend it to do new and interesting things: It is licensed under a permissive Apache 2.0 license.

In April 2009 I gave a public lecture about PostCanvas to the Chaos Computer Club in Ulm. Recordings of this Chaosseminar are now available.

Samples:

Here are some examples of PostCanvas including interactive console access and sample PostScript applications that I used as references to implement basic graphics rendering: