NAME - A class to build of postscript files using a procedural perl interface


 use Postscript;
 $ps = Postscript->newWithProperties($properties);
 $ps->lineto(100, 140); # for example


Instantiate a Postscript object. $properties is a hash which which for which the key file indicates a path where to write the final Postscript file. Then issue arbitrary Postscript commands. Finally invoke the close method which writes a valid Postscript file including header and footer. Some more complex methods (like centered text) automatically add Postscript ``functions'' to the file which are included at most once. The following list documents the relevant implemented methods which for most the time correspond with a Postscript operator. Therefore more competent explenation of these methods can be saught for in various Postscript documentations.


newWithProperties($properties) - initializes a new Postscript object. '$properties' is a dictionary (hash) that contains initialization options. 'path' denotes the destination path of the output file (defaults to '/tmp/'). If the extension is '.pdf', a pdf file is created. 'properties' specifies further properties in a dictionary used to modify the PS header. 'createPDF' is a boolean forcing a final conversion to pdf file format (this results in, both, a 'ps' and a 'pdf' file). 'backgroundDocument' specifies a pdf Document the pages of which are drawn on each sequential page being created before any further drawing is executed.

Postscript code producing methods