/usr/share/doc/libpostscript-perl/examples/example.pl is in libpostscript-perl 0.06-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #!/usr/bin/perl -w
use strict;
use PostScript::TextBlock;
my $tb = new PostScript::TextBlock;
$tb->addText( text => "Hullaballo in Hoosick Falls.\n",
font => 'CenturySchL-Ital',
size => 24,
leading => 100
);
$tb->addText( text => "by Charba Gaspee.\n",
font => 'URWGothicL-Demi',
size => 18,
leading => 36
);
open I, "example.txt";
undef $/;
my $text = <I>;
$tb->addText( text => $text,
font => 'URWGothicL-Demi',
size => 14,
leading => 24
);
open OUT, '>psoutput.ps';
my $pages = 1;
# create the first page
#
my ($code, $remainder) = $tb->Write(572, 752, 20, 772);
print OUT "%%Page:$pages\n"; # this is required by the Adobe
# Document Structuring Conventions
print OUT $code;
print OUT "showpage\n";
# Print the rest of the pages, if any
#
while ($remainder->numElements) {
$pages++;
print OUT "%%Page:$pages\n";
($code, $remainder) = $remainder->Write(572, 752, 20, 772);
print OUT $code;
print OUT "showpage\n";
}
|