Paper::Specs
Paper::Specs provides size and layout information for common paper sizes and label formats. This allows uses of your application to request output formatted for (say) A4 or US Letter paper, the module will then converts these names into absolute sizes (in cm, mm, inches, or points).Download
- Paper-Specs-0.10.tar.gz - version 0.10, 12 April 2007
The following example demonstrates how to use Paper::Specs to find the size of an A4 page:
use strict;
use warnings;
use Paper::Specs;
my $units = 'cm';
my $paper_size = 'A4';
Paper::Specs->units($units);
if (my $page = Paper::Specs->find(code=>$paper_size)) {
my $width = $page->sheet_width;
my $height = $page->sheet_height;
print "$paper_size paper is $width $units x $height $units\n"
} else {
warn "No information for paper size $paper_size\n";
}
Running this example prints:
A4 paper is 21 cm x 29.7 cmHistory
I took over maintanance of Paper::Specs from the author, Jay Lawrence, on 20 December 2004. Documentation
For full documentation please see the Paper::Specs page on CPAN. Copyright and License
Copyright © 2001-2003 - Jay Lawrence, Infonium Inc.
Modifications from version 0.06 onwards Copyright © 2004-2007 Jon Allen (JJ) This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Copyright © 2003-2008 Jon Allen (JJ)
Last site update was on 07 May 2008 - 10:18 What's new?