#!/usr/bin/perl -w use strict; use String::Random; use PDF::Reuse; use PDF::Reuse::Barcode; my ($x,$y,$count,$i) = (-100,50,0,0); my $rp = new String::Random; prFile('barpass.pdf'); for $i (1 .. 45) { pass(); } prEnd(); exit; sub pass { $x += 150; if ($x>=400) { $y+=50; $x=50; } $count++; PDF::Reuse::Barcode::Code128(x => $x, y => $y, mode => 'graphic', value => $rp->randpattern("ssssssss")); }