From: Eddie Griffiths <edgriff () ihug ! co ! nz>
To: tru64-unix-managers
Subject: Thermal Printers
Date: Tue, 12 Jun 2001 06:45:29 +0000 [thread overview]
Message-ID: <102653649621776.tru64-unix-managers.marc@archive.invalid> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: multipart/mixed; boundary="------=_NextPart_000_0024_01C0F36F.DA5CAD00", Size: 7219 bytes --]
This is a multi-part message in MIME format.
------=_NextPart_000_0024_01C0F36F.DA5CAD00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Probably off topic here so I appologise if it is.
We have a datamax thermal printer. We use a script for its drivers
When we were on HP-UX it worked fine. creating barcodes perfectly
Since moving onto Compaq Tru-64 it puts an ! to the start of the =
string..
Instead if the barcode producing ABC1234 it produces !ABC123
below is a snippet of the script. If you want the lot let me know...
nqrd $1 $2 $3 |
awk -v label_length=3D6 '
BEGIN {line =3D 1}
line =3D=3D 1 {
printf "\002f251\rE\r\002L\rD11\r\n"
printf "191100501000020%s\r\n", substr($0,2); line++; next}
line =3D=3D 2 {
printf "191100300850020%s\r\n", substr($0,2); line++; next}
line =3D=3D 3 {
printf "191100300700020%s\r\n", substr($0,2); line++; next}
line =3D=3D 4 {
printf "191100300550020%s\r\n", substr($0,2); line++; next}
line =3D=3D 5 {
printf "191100300300020%s\r\n", substr($0,2); line++; next}
line =3D=3D 6 {
# A empty line 6 is created by UR labels (no bar-code)
if (length($0) >=3D 12) {
# Print 7 char NHI number
if (substr($0,6,1) !=3D " ")
printf "1E8202000000020A%s\r", substr($0,6,7)
# or print 6 char UR number
else if (substr($0,7,1) !=3D " ")
printf "1E8202000000020A%s\r", substr($0,7,6)
# or print 5 char UR number
else if (substr($0,8,1) !=3D " ")
printf "1E8202000000020A%s\r", substr($0,8,5)
else # Free-format label 9 lines long so skip 3
{getline blank; getline blank; getline blank}
}
printf "191100100000360v 2\r\n"
printf "Q0001\r\nE\r\n"; line =3D 1; next
}
' |
nqwr $1 $2 $3 $4 $5 $6 $7
;;
Eddie Griffiths
edgriff@ihug.co.nz
Manager / Developer
Database Developments Invercargill
ddi@ihug.co.nz
Ph:(03) 216 1112
Cp:(025) 288 2222
*************************************************************************=
***
This email or attachment(s) may contain confidential or legally =
privileged information intended for the
sole use of the addressee(s). Any use, redistribution, disclosure, or =
reproduction of this message,=20
except as intended, is prohibited. If you received this email in error, =
please notify the sender and erase
all copies of the message, including any attachments.=20
*************************************************************************=
***
------=_NextPart_000_0024_01C0F36F.DA5CAD00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Probably off topic here so I appologise =
if it=20
is.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>We have a datamax thermal printer. We =
use a script=20
for its drivers</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>When we were on HP-UX it worked fine. =
creating=20
barcodes perfectly</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Since moving onto Compaq Tru-64 it puts =
an ! to the=20
start of the string..</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Instead if the barcode producing =
ABC1234 it=20
produces !ABC123</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>below is a snippet of the script. If =
you want the=20
lot let me know...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>
<P><FONT size=3D2>nqrd $1 $2 $3 |</FONT></P>
<P><FONT size=3D2>awk -v label_length=3D6 '</FONT></P>
<P><FONT size=3D2>BEGIN {line =3D 1}</FONT></P>
<P><FONT size=3D2>line =3D=3D 1 {</FONT></P>
<P><FONT size=3D2>printf "\002f251\rE\r\002L\rD11\r\n"</FONT></P>
<P><FONT size=3D2>printf "191100501000020%s\r\n", substr($0,2); line++;=20
next}</FONT></P>
<P><FONT size=3D2>line =3D=3D 2 {</FONT></P>
<P><FONT size=3D2>printf "191100300850020%s\r\n", substr($0,2); line++;=20
next}</FONT></P>
<P><FONT size=3D2>line =3D=3D 3 {</FONT></P>
<P><FONT size=3D2>printf "191100300700020%s\r\n", substr($0,2); line++;=20
next}</FONT></P>
<P><FONT size=3D2>line =3D=3D 4 {</FONT></P>
<P><FONT size=3D2>printf "191100300550020%s\r\n", substr($0,2); line++;=20
next}</FONT></P>
<P><FONT size=3D2>line =3D=3D 5 {</FONT></P>
<P><FONT size=3D2>printf "191100300300020%s\r\n", substr($0,2); line++;=20
next}</FONT></P>
<P><FONT size=3D2>line =3D=3D 6 {</FONT></P>
<P><FONT size=3D2># A empty line 6 is created by UR labels (no=20
bar-code)</FONT></P>
<P><FONT size=3D2>if (length($0) >=3D 12) {</FONT></P>
<P><FONT size=3D2># Print 7 char NHI number</FONT></P>
<P><FONT size=3D2>if (substr($0,6,1) !=3D " ")</FONT></P>
<P><FONT size=3D2>printf "1E8202000000020A%s\r", =
substr($0,6,7)</FONT></P>
<P><FONT size=3D2># or print 6 char UR number</FONT></P>
<P><FONT size=3D2>else if (substr($0,7,1) !=3D " ")</FONT></P>
<P><FONT size=3D2>printf "1E8202000000020A%s\r", =
substr($0,7,6)</FONT></P>
<P><FONT size=3D2># or print 5 char UR number</FONT></P>
<P><FONT size=3D2>else if (substr($0,8,1) !=3D " ")</FONT></P>
<P><FONT size=3D2>printf "1E8202000000020A%s\r", =
substr($0,8,5)</FONT></P>
<P><FONT size=3D2>else # Free-format label 9 lines long so skip =
3</FONT></P>
<P><FONT size=3D2>{getline blank; getline blank; getline =
blank}</FONT></P>
<P><FONT size=3D2>}</FONT></P>
<P><FONT size=3D2>printf "191100100000360v 2\r\n"</FONT></P>
<P><FONT size=3D2>printf "Q0001\r\nE\r\n"; line =3D 1; next</FONT></P>
<P><FONT size=3D2>}</FONT></P>
<P><FONT size=3D2>' |</FONT></P>
<P><FONT size=3D2>nqwr $1 $2 $3 $4 $5 $6 $7</FONT></P>
<P><FONT size=3D2>;;</FONT></P></DIV>
<DIV><BR><FONT face=3DArial size=3D2>Eddie Griffiths<BR></FONT><A=20
href=3D"mailto:edgriff@ihug.co.nz"><FONT face=3DArial=20
size=3D2>edgriff@ihug.co.nz</FONT></A></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Manager / Developer<BR>Database =
Developments=20
Invercargill<BR></FONT><A href=3D"mailto:ddi@ihug.co.nz"><FONT =
face=3DArial=20
size=3D2>ddi@ihug.co.nz</FONT></A><BR><FONT face=3DArial=20
size=3D2>Ph:(03) 216 1112<BR>Cp:(025) 288=20
2222</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2>****************************************************************=
************<BR>This=20
email or attachment(s) may contain confidential or legally privileged=20
information intended for the<BR>sole use of the addressee(s). Any use,=20
redistribution, disclosure, or reproduction of this message, <BR>except =
as=20
intended, is prohibited. If you received this email in error, please =
notify the=20
sender and erase<BR>all copies of the message, including any =
attachments.=20
<BR>*********************************************************************=
*******</FONT></DIV></BODY></HTML>
------=_NextPart_000_0024_01C0F36F.DA5CAD00--
reply other threads:[~2001-06-12 6:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox