hectorejch has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I have a problem with PDF::Report.
I can generate the PDF without problems, but when I add a barcode, I can not open the file because it says the file is corrupt. When only text and lines, is generated correctly, but when I insert the barcode the file does not open
I think it's a problem with the parameters sent to the function.
Then leave the code snippet I am using.
my $pdf = new PDF::Report(PageSize => "A4", PageOrientation => "Portra +it"); $pdf->newpage( 0 ); $pdf->openpage( 0 ); $pdf->setSize( 8 ); $pdf->addRawText("Hola Mundo",300, 300); my $code = '31570918'; $pdf->drawBarcode(300, 500, 1, 1, '3of9', '31570918', '012345', 9+$zon +e, 9+$zone, 3+$zone, 0, '-', 0.5, 9, ''); print "Content-Disposition: attachment; filename=\"carnet.pdf\"\n\n"; print "Content-type: application/pdf\n\n"; print $pdf->Finish();
Worth mentioning is a web system, from which I generate patron cards.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PDF::Report and barcode generation
by Corion (Patriarch) on Mar 18, 2015 at 15:23 UTC | |
by hectorejch (Initiate) on Mar 18, 2015 at 16:36 UTC | |
by ww (Archbishop) on Mar 18, 2015 at 17:43 UTC | |
|
Re: PDF::Report and barcode generation
by FreeBeerReekingMonk (Deacon) on Mar 19, 2015 at 21:00 UTC | |
|
Re: PDF::Report and barcode generation
by hectorejch (Initiate) on Mar 20, 2015 at 14:41 UTC |