Ok so I have to say right off the bat, I don't know much about barcoding. I did manage to get the code working to generate and size the barcode.
My problem is that the barcode width seems to change based on the number of characters in the code. I didn't think this was a problem initially but as I started testing on our equipment I found a pretty big problem.
The barcodes with 4 digits (7512 from my test) scanned perfect with the following code. Barcodes with 5 digits (12206 from my test) will not scan. If you look at the ID's they are in the exact same position on the card. Same distance from the bottom and top. It looks like when i use the 5 digit number its scaling from the middle out. The heights of the barcodes stay the same just the width changes equally on both sides.
Here is the code i use to generate the barcode and I'm wondering is there any way to keep the barcode sizes exactly the same so they will both snap the same. Is there a property i can set for this? Is my code wrong? Anything?
Barcode = createObject("java", "net.sourceforge.barbecue.linear.code128.Code128Barcode").init(#Participant_ID__c#);
BarcodeImageHandler = createObject("java", "net.sourceforge.barbecue.BarcodeImageHandler");
<!--- extract the buffered image of the bar code --->
<cfset Handler = createObject("java", "net.sourceforge.barbecue.BarcodeImageHandler")>
<cfset BuffImg = Handler.getImage( Barcode ) />
<!--- use it create a CF image object --->
<cfset CFImageObject = ImageNew(buffImg) />
<!--- do whatever you want with the image object --->
<cfimage source="#CFImageObject#" action="write" overwrite="Yes" destination="C:\inetpub\wwwroot\barcodes\#Participant_ID__c#.jpg">
Thanks for your help