Anyone get barcodes to print/scan on a Mac?

rgould8 at aol.com rgould8 at aol.com
Sun Sep 16 00:51:49 EDT 2007


I've been scouring the web looking for a good barcode font that will work with my barcode scanner (an "intelliscanner", which reads standard Code 128 barcodes).? 

The trouble I'm finding is that the barcode font I am using works great in Windows, but the Mac version of it won't seem to display the first and last characters of the formula when printing, so it never scans.

I found a great Rev. stack to demo barcode printing in the Rev archives, and I noticed the formula for Code 128 barcodes puts a "numtochar(103+32) at the beginning and numtochar(106+32) at the end.? On my Mac, these special characters do not display anything in the barcode field.? In Windows, I get the proper barcode chars to display at the beginning and end of the string.? Not sure why.? I'm trying to determine if it's the barcode font itself (In theory, it's the same between Mac and Windows), OR perhaps something different in the way the Mac handles numtochar(103+32).? Any advice is greatly appreciated.


function createBarcode pCatNum
??? put 103 into total
??? put 1 into counter
???? 
??? repeat for each char c in pCatNum
??????? add (chartonum(c) - 32) * counter to total
??????? add 1 to counter
??? end repeat
???? 
??? put total mod 103 into checkSum
??? put numtochar(103+32) into theCode
??? put pCatNum after theCode
??? put numtochar(checkSum+32) after theCode
??? put numtochar(106+32) after theCode
???? 
??? replace space with numtochar(145) in theCode
???? 
??? -- fix for infrequent problem
??? replace numtochar(127) with numtochar(139) in theCode
???? 
??? return theCode
end createBarcode


________________________________________________________________________
Email and AIM finally together. You've gotta check out free AOL Mail! - http://mail.aol.com



More information about the use-livecode mailing list