Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Hey guys, so I am in need of some serious help! My goal was to generate labels with a barcode. I used the PostScript::MailLabels module for the label set up, and since I want to IMPORT my own barcodes I used the Barcode::Code39 module. Everything is working great except one very serious problem.

The barcode image I upload is uploaded via CGI/html and when I generate my postscript file for the labels it can NOT read my barcode image. It instead prints out the code to show the image ($Cgi->img({-src => "data:image/gif;base64,$barcode_64"});

My question is, is there some way I can make this image appear through post script? When I generate my labels how can I get my barcode to appear?

labels->labelsetup( Avery => $labels->averycode(8160), PaperSize => 'letter', Font => 'Times-Roman', Y_Adjust => 1 / 16, X_Adjust => 1 / 16, ); #Generate image foreach my$row (@$rows) { my $barcode = (GD::Barcode::Code39->new('*'.$row->[1].'*')->plot(N +oText=>1, Height=>20)->gif()); my $barcode_64 = encode_base64($barcode); my $barcode_image = $Cgi->img({-src => "data:image/gif;base64,$bar +code_64"}); #Array with label data we need push(@data, [$row->[3] . " " . +$row->[5] . " " . $row->[6], "CMDM# " . $row->[0] . " ". "Copy# " . $ +row->[4], $barcode_image, $row->[1],"Property of Me"]); } print $Cgi->header(-type => "application/ps", -attachment => 'test.ps'), $labels->makelabels(\@data);

In reply to HELP! Label images PostScript by Tru27roo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (4)
    As of 2014-10-21 05:44 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      For retirement, I am banking on:










      Results (96 votes), past polls