People like paper. Despite years of talk about the future “paperless” electronic office, and the obvious environmental concerns of using as much paper we do, people still like paper. Most companies creating systems to do business electronically over the Web will run into the problem of integrating printing services with their web front end.
Adobe PostScript is the standard programming language for representing printed pages. This chapter will introduce you to PostScript, and will provide a framework for easily generating PostScript code in the form of the PostScriptpackage of Perl modules. These modules may be easily integrated into a CGI application, and an example is provided in this chapter. The PostScript package includes three main modules:
PostScript::TextBlock. This module provides a text block object to which you can add text of different fonts and sizes. The PostScript code to draw the text block with arbitrary margins at any coordinate on a page may be automatically generated.
PostScript::Document. This module provides a document object that allows you to easily generate multipage PostScript text blocks with headers, footers, page numbers, and all.
PostScript::Elements.This module provides methods for generating the PostScript code to draw primitive shapes such as lines, boxes, and circles.
The modules present an easily expandable framework for generating PostScript code from Perl. Before delving into ...