There are a lot of different barcode standards.   The easiest way to do it is to get a 3of9 barcode font and just print your number in 3of9 font.   It's no different programatically to printing in courier or times or arial.    That's if you're using a laser or inkjet printer.   Matrix printers are pretty flaky with 3of9 barcode, which is why they developed other barcode standards with arithmetic checking incorporated.
 
On the other hand if you want to have one of the other standards, or if you're printing from printers where you dont have the control over them,   you will need to make your barcode differently.    Some of the barcode standards have checksums of various kinds.  3of9 is just a simple font with no checksums and all it does is represent numbers as bars.   But it's the the least reliable in readers.   That's why other barcodes, such as the ones used in supermarkets, use arithmetic checksums to allow the reader to verify it's got a valid reading.
 
Depending on whether you own the printer you're going to use, and what kind of reader you're going to use, producing barcodes might be a trivial affiar or it might not. 
 
As they say,  "Barcodes aint barcodes!"
 

Cheers
Mike Kear
Windsor, NSW, Australia
Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month
 

 
On 9/26/05, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:
Download the barbeque jar file from sourceforge, dump it into the /lib/
directory and then its a matter of 6 lines of code to generate any
standard barcode image. Why would you want to use a custom tag that uses a
http call?

<cfscript>
bcFactory = createobject("java","net.sourceforge.barbecue.BarcodeFactory");
bcImage =
createobject("java","net.sourceforge.barbecue.BarcodeImageHandler");
os = createobject("java","java.io.FileOutputStream");
bcImage.outputBarcodeAsJPEGImage(bcFactory.createCode128 ("106AB0119501"),
os.init("c:\barcodeImage.jpg"));
</cfscript>
--- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to