#!/usr/bin/perl -w use strict; use PostScript::Document; my $doc = new PostScript::Document; $doc->addText( text => "Hullabalo in Hoosick Falls.\n", font => 'CenturySchL-Ital', size => 24, leading => 100 ); $doc->addText( text => "by Charba Gaspee.\n", font => 'URWGothicL-Demi', size => 18, leading => 36 ); $doc->addHeader(text => "Hullabaloo in Hoosick Falls", font => 'URWGothicL-Demi', size => 9, leading => 11 ); $doc->addFooter(text => "Page ##Page", font => 'URWGothicL-Demi', size => 9, leading => 11 ); # Now read in a big text file and add it open I, "example.txt" or die "Couldn't open example.txt: $!"; undef $/; my $text = ; $doc->addText( text => $text, font => 'URWGothicL-Demi', size => 14, leading => 24 ); open OUT, '>psoutput.ps' or die "Couldn't open psoutput.ps: $!"; my $code = $doc->Write(); # use defaults print OUT $code;