PostScript::Columns - Squeeze a text file into multiple columns.
use PostScript::ColDoc; $psdoc= pscolumns( -margins => [30,20], # NSEW or NS,EW or N,EW,S or N,E,W,S (like CSS) -headfont => 'NimbusMonL-Bold', -headsize => 12, -head => $head, -font => 'NimbusMonL-Regu', -size => 10, -text => $text, # default font/size for foot: -foot => "Page \$p of \$pp", # will interpolate later :) ); # use all defaults, no footer $doc= pscolumns( -size => 5, -head => "Left\nLeft Also\tTest Document\tRight", -text => $text, -foot => scalar(localtime)."\tFoot\tPage \$p of \$pp", );
Creates a PostScript document with a user-defined header and footer, then attempts to squeeze the data into as many columns as possible.
Only the monospace PostScript fonts are available:
NimbusMonL-Regu
NimbusMonL-Bold
NimbusMonL-ReguObli
NimbusMonL-BoldObli
Array ref that specifies page margins, in points (1/72 of an inch). North, East, West South are expressed as four elements: [ N, E, S, W ], three elements [ N, E_W, S ], two elements [ N_S, E_W ], or one element [ N_S_E_W ]. (This is the same order that CSS uses.)
Note: Different printers may require drastically different margins. You'll have to experiment each time you use this module with a new printer.
Name of the font to use for the header (see "AVAILABLE FONTS").
Size of the font to use for the header (in points).
String to use as header. Upper-right, centered, and upper-left fields are tab-separated. In the string, $p will be replaced by the current page number, and $pp with the total number of pages.
$p
$pp
Name of the font to use for the text (see "AVAILABLE FONTS").
Size of the font to use for the text (in points).
Columnar text.
Name of the font to use for the footer (see "AVAILABLE FONTS").
Size of the font to use for the footer (in points).
String to use as footer. Lower-right, centered, and lower-left fields are tab-separated. In the string, $p will be replaced by the current page number, and $pp with the total number of pages.
v, <five@rant.scriptmania.com>
perl(1).
To install PostScript::Columns, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PostScript::Columns
CPAN shell
perl -MCPAN -e shell install PostScript::Columns
For more information on module installation, please visit the detailed CPAN module installation guide.