From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653649621776.tru64-unix-managers.marc@archive.invalid> From: Eddie Griffiths Date: Tue, 12 Jun 2001 06:45:29 +0000 To: tru64-unix-managers Subject: Thermal Printers X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653649621776 MIME-Version: 1 Content-Type: multipart/mixed; boundary="------=_NextPart_000_0024_01C0F36F.DA5CAD00" 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
Probably off topic here so I appologise = if it=20 is.
 
We have a datamax thermal printer. We = use a script=20 for its drivers
 
When we were on HP-UX it worked fine. = creating=20 barcodes perfectly
 
Since moving onto Compaq Tru-64 it puts = an ! to the=20 start of the string..
 
Instead if the barcode producing = ABC1234 it=20 produces !ABC123
 
below is a snippet of the script. If = you want the=20 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++;=20 next}

line =3D=3D 2 {

printf "191100300850020%s\r\n", substr($0,2); line++;=20 next}

line =3D=3D 3 {

printf "191100300700020%s\r\n", substr($0,2); line++;=20 next}

line =3D=3D 4 {

printf "191100300550020%s\r\n", substr($0,2); line++;=20 next}

line =3D=3D 5 {

printf "191100300300020%s\r\n", substr($0,2); line++;=20 next}

line =3D=3D 6 {

# A empty line 6 is created by UR labels (no=20 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=20 Invercargill
ddi@ihug.co.nz
Ph:(03)    216 1112
Cp:(025)  288=20 2222
 
****************************************************************= ************
This=20 email or attachment(s) may contain confidential or legally privileged=20 information intended for the
sole use of the addressee(s). Any use,=20 redistribution, disclosure, or reproduction of this message,
except = as=20 intended, is prohibited. If you received this email in error, please = notify the=20 sender and erase
all copies of the message, including any = attachments.=20
*********************************************************************= *******
------=_NextPart_000_0024_01C0F36F.DA5CAD00--