Paper::Specs is a Perl module with size and layout information for paper stock, forms, and labels.
use Paper::Specs units => "cm";
my $form = Paper::Specs->find( brand => "Avery", code => "1234");
use Paper::Specs units => "cm", brand => "Avery";
my $form = Paper::Specs->find( code => "1234");
# location of first label on sheet
my ($xpos, $ypos) = $form->label_location( 1, 1);
my ($h, $w) = $form->label_size;
I appologise in advance for the hasty nature of this code. I want to get it out to support some other code I am writing. I promise to revisit it shortly to clear up the rough patches - however your valuable input is most welcome.
CAVEAT ALPHA CODE - This is a preliminary module and will be subject to fluctuations in API and structure based on feedback from users.
I expect that there will be some interest in this code and it should firm up quickly.
If this module does not deliver what you are looking for then you are encouraged to contact the author and voice your needs!
OTHER LABELS - I know about the Labels.xml file which is part of OpenOffice but have not figured out how it is encoded. I have the gLabels specifications file too. I plan to use these to help populate the data for this module.