> Actually if you are just doing 3of9 or UPC type barcodes it 
> is simple to do with a truetype font and a page or so of 
> code.  If this is what you are after I have already done the 
> work for our internal system here and you are welcome to it.  
> If you want 2D barcodes, good luck :)

Here is the code I use for EAN/UPC type barcodes...

This is called as a custom tag something like...
<cf_barcode encodethis="#url.bc#">

With a style like
..ean13 { font-family: "EAN-13"; font-size: 50px;}

Unfortunately I can't find the site I downloaded the font from but if anyone
wants it I can email it to you.

-----------------------------------------------------------------

<cfparam name="Attributes.EncodeThis" default="oops">
<cfset encodethis = trim(Attributes.EncodeThis)>

<cfif len(encodethis) IS 12>
  <cfset encodethis = "0" & encodethis>
</cfif>

<cfif len(encodethis) IS NOT 13>
  <p>Error, barcode wrong format.</p>
  <cfexit>
</cfif>

<!--- Character 1 --->
<cfset barcode = chr(#evaluate(33+mid(encodethis,1,1))#)>
<!--- Character 2 --->
<cfset barcode = barcode & chr(#evaluate(96+mid(encodethis,2,1))#)>
<!--- Left Data 5 --->
<cfif "0,1,2,3" CONTAINS left(encodethis,1)><cfset index = 48><cfelse><cfset
index = 64></cfif>
<cfset barcode = barcode & chr(#evaluate(index+mid(encodethis,3,1))#)>
<cfif "0,4,7,8" CONTAINS left(encodethis,1)><cfset index = 48><cfelse><cfset
index = 64></cfif>
<cfset barcode = barcode & chr(#evaluate(index+mid(encodethis,4,1))#)>
<cfif "0,1,4,5,9" CONTAINS left(encodethis,1)><cfset index =
48><cfelse><cfset index = 64></cfif>
<cfset barcode = barcode & chr(#evaluate(index+mid(encodethis,5,1))#)>
<cfif "0,2,5,6,7" CONTAINS left(encodethis,1)><cfset index =
48><cfelse><cfset index = 64></cfif>
<cfset barcode = barcode & chr(#evaluate(index+mid(encodethis,6,1))#)>
<cfif "0,3,6,8,9" CONTAINS left(encodethis,1)><cfset index =
48><cfelse><cfset index = 64></cfif>
<cfset barcode = barcode & chr(#evaluate(index+mid(encodethis,7,1))#)>
<!--- Center 1 --->
<cfset barcode = barcode & chr(124)>
<!--- Right Data 5 --->
<cfset barcode = barcode & chr(#evaluate(80+mid(encodethis,8,1))#)>
<cfset barcode = barcode & chr(#evaluate(80+mid(encodethis,9,1))#)>
<cfset barcode = barcode & chr(#evaluate(80+mid(encodethis,10,1))#)>
<cfset barcode = barcode & chr(#evaluate(80+mid(encodethis,11,1))#)>
<cfset barcode = barcode & chr(#evaluate(80+mid(encodethis,12,1))#)>
<!--- Check 1 --->
<cfset barcode = barcode & chr(#evaluate(112+mid(encodethis,13,1))#)>
<!--- OUTPUT --->
<cfoutput>#barcode#</cfoutput>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211980
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to