Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

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 => ''), $labels->makelabels(\@data);

In reply to HELP! Label images PostScript by Tru27roo

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (3)
    As of 2018-05-26 18:29 GMT
    Find Nodes?
      Voting Booth?