I have written a script which prints from the command line, run the same script from a webpage and it doesn't work. The worst part of this is that if I change the printer to the hp the script works. Of the research I was able to find that the acl needs to be changed but I have changed what I could and it doesn't seem to matter.

the script:

#!/usr/bin/perl use Win32::Printer; my $tag = new Win32::Printer( height => 216, width => 288, printer => $ARGV[1], unit => 'pt' ); my $tc = $ARGV[0] ; my $body = $ARGV[5]; my $year = $ARGV[2]; my $model = substr($ARGV[3], 0, 12); my $stock = $ARGV[4]; my $engine = $body." - ".$ARGV[6]; my $seller = "Seller: ".$ARGV[8]." - Lot #: ".$ARGV[9]." - ".$ARGV[10] +; my $barcode = $ARGV[7]."-".$stock; my $stfont = $tag->Font('Arial', 12); my $stockfont = $tag->Font('Arial Bold', 55); my $engfont = $tag->Font('Arial', 16); my $yearfont = $tag->Font('Arial', 40); my $modelfont = $tag->Font('Arial', 35); my $bcfont = $tag->Font('Code128bWin', 16); @tlist = split(//, $barcode); for my $e (0..$#tlist) { my $n = $e + 1; my $val = ord($bc[$e]); if ($val == 128){ $val = 0; } elsif ($val >= 33 && $val <= 126){ $val -= 32; } elsif ($val > 126 && $val != 128){ $val -= 50; } $count += ($val * $n); } my $rem = ($count % 103); if ($rem == 0){ $rem = 128; } elsif ($rem >= 1 && $rem <= 94){ $rem += 32; } elsif ($rem > 94 && $rem != 0){ $rem += 50; } $check = chr($rem); my $code = chr(136).$barcode.$check.chr(138); for my $n(1..$tc) { if ($n > 1) { $tag->Page(); } $tag->Font($stockfont); $tag->Write($stock, 144, 5, 0x00080000); $tag->Font($yearfont); $tag->Write($year, 144, 55, 0x00080000); $tag->Font($modelfont); $tag->Write($model, 144, 90, 0x00080000); $tag->Font($engfont); $tag->Write($engine, 10, 135); $tag->Font($stfont); $tag->Write($seller, 10, 155); $tag->Font($bcfont); $tag->Write($code, 144, 175, 0x00080000); $tag->Font($stfont); $tag->Write($barcode, 144, 195, 0x00080000); } $tag->Close();

the in information

"2" "Datamax I-4208" "2004" "CUTLASS CIERA INTL SERIES" "M00A9090" "Coupe" "engine info" "vindefghijklmnopq" "IQ" "12345" "2009-06-19"


In reply to win32::printers Cannot create printer object! Access is denied by blenkhn

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!
  • 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, details, 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, summary, 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.