use PDF::API2; my $pdf = PDF::API2->new(-file => 'barcode.pdf'); my $bc = $pdf->xo_codabar( -font => $pdffont, -code => $code, -quzn => $quzn, -umzn => $umzn, -lmzn => $lmzn, # fontsize at bottom -zone => $zone, -ofwt => $owft, -fnsz => $fnsz, -spcr => $spcr, ); $pdf->save();