Shaun Mccran

My digital playground

30
J
A
N
2011

QRcfc released on RIAforge.org

I've released the first version of a ColdFusion QR barcode generator on http://qrcfc.riaforge.org/.

It is a CFC based wrapper for the Google ZXing barcode Java library http://code.google.com/p/zxing/.

There is a demo here: ColdFusion QR barcode generator

This demo above is a form that allows you to pick a format and post the required data to 'qr.cfc'. qr.cfc then uses the javaloader library (http://javaloader.riaforge.org/) to load in two jar files that translate the argument strings into a bitmatrix, which you can output as a QR image.

It requires at least a JVM of 1.5 to be running, the demo above does work, but I've discovered that this server is running 1.4, I have a service request 'in' to have it updated to 1.6

Also the svn release uses cfimage to create the output image, if you are running ColdFusion server 7 or below this won't work (cfimage was introduced in ColdFusion 8) so you'll need to do something like this:

view plain print about
1<cfset buff = converter.toBufferedImage( bitMatrix ) />
2<!--- convert it to a CF compatible image --->
3<!--- CF 8 version <cfset createdImage = ImageNew( buff ) />--->
4
5<cfset strPath = ExpandPath( "./" ) />
6<cfset strPath = strPath & 'images\'>
7
8<cfscript>
9    saveToFile = strPath & 'myBarcode.png';
10    ImageIO = createObject("java", "javax.imageio.ImageIO");
11    outStream = createObject("java", "java.io.FileOutputStream").init(saveToFile);
12
13    // formats ie "png", "gif", ....
14
    wasWritten = ImageIO.write( buff, "png", outStream);
15    outStream.close();
16
17    createdImage = 'images/myBarcode.png';
18
</cfscript>

QR data formats

The biggest hurdle with this project is the format of each of the QR types. Most of them are different in some way. This is why there is a series of functions in the CFC. As it is an open platform it seems to have developed organically, so the format for an email is different from a vcard, for example.

Thanks to...

http://matez.de/qr_codes/?show=MEBKM and http://www.qr-barcodes.com/data-formats/ - for string format examples.

Also thanks to Leigh of http://cfsearching.blogspot.com who was a great help with cfimage issues and it was his blog articles that inspired me to look into this.

TweetBacks
Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
tschilbi's Gravatar The demo code does not produce real results..only http://www.play.com!
# Posted By tschilbi | 26/07/2011 04:52
Shaun McCran's Gravatar Good spot!

I was playing with some Java.io file writing stuff and I'd left it in there, it all works again now.
# Posted By Shaun McCran | 26/07/2011 06:51
telolish's Gravatar Absolutely this blog is amazing for simply read and write for students they prefers http://www.myeditingandwritingservices.com/ it is the best site in all more effective site thank you very much for your article.
# Posted By telolish | 27/05/2015 23:22
replica handbags uk's Gravatar While advance in a solid accretion for the division one accept http://www.qualityhandbag.com to be cautious. Accepting a reasonable accord on aggregate acquirement is not the sole belief for allotment a vendor. The basal aphorism of accepting the appropriate http://www.rfshoeoutlets.co.uk handbags for one’s abundance is specific benchmark.
# Posted By replica handbags uk | 18/06/2015 19:30
Tynsea's Gravatar QRcfc libéré le RIAforge.org
http://www.trustedmontre.com
# Posted By Tynsea | 23/06/2015 00:32
asdf's Gravatar nice omcinl
www.mccran.co.uk
# Posted By asdf | 29/07/2015 02:39
Miriam's Gravatar Everyone are using this type of http://customessayz.org/ web services for good education in present days. These educational reviews are helpful to our school students and college essay writers.
# Posted By Miriam | 29/07/2015 02:40
Sam's Gravatar That’s really great to hear that QRcfc has released on RIAforge.org. I have been looking for QRcfc and I think this is the right time to know the exact information. I am really happy for that. Keep sharing such information! http://www.goldenagecheese.com
# Posted By Sam | 14/09/2015 21:00
Monte Carlo Simulation Stats Homework Help's Gravatar I personally like your post; you have shared good insights and experiences. Keep it up.
# Posted By Monte Carlo Simulation Stats Homework Help | 02/10/2015 03:27
insta followers's Gravatar I was playing with some Java.io file writing stuff and I'd left it in there, it all works again now.
how to get more instagram likes
http://socialgrand.com/buy-instagram-likes/
# Posted By insta followers | 08/10/2015 00:09
cardsharing's Gravatar The demo code does not produce real results..only
# Posted By cardsharing | 08/10/2015 00:53
www.continuedinnovation.com's Gravatar It requires at least a JVM of 1.5 to be running, the demo above does work, but I've discovered that this server is running 1.4, I have a service request 'in' to have it updated to 1.6
# Posted By www.continuedinnovation.com | 08/11/2015 02:56
cccam server's Gravatar Rather than writing out long winded table code to display your data in a tabulated fashion why not use the dataTables JQuery plugin to do it for you...
# Posted By cccam server | 15/11/2015 03:26
amazon coupon codes's Gravatar These type of articles keeps the users interest in the website, and keep on sharing more ... good luck.
# Posted By amazon coupon codes | 16/11/2015 04:10
cccam server's Gravatar Thank you for your kind information. Actually I was very much sad that I couldn’t display dynamic data in tables. I have tried many methods and those were all failures. Now I am very happy in getting the perfect way to do this job
# Posted By cccam server | 21/11/2015 01:13
Local Plumbers's Gravatar Thank you for your kind information. Actually I was very much sad that I couldn’t display dynamic data in tables. I have tried many methods and those were all failures. Now I am very happy in getting the perfect way to do this job
# Posted By Local Plumbers | 22/11/2015 00:38
Jose's Gravatar I love the work very much and this blog is very interesting and useful for me in this way, I appreciate this work. http://www.seamlessaluminiumguttering.com/
# Posted By Jose | 24/11/2015 22:26
honyali's Gravatar My studio has done a great interview with them recently talking about ...
# Posted By honyali | 01/12/2015 06:07
official source's Gravatar I just thought it may be an idea to post in case anyone else was having problems researching but I am a little unsure if I am allowed to put names and addresses on here.
# Posted By official source | 13/12/2015 22:20
cccam server's Gravatar The demo code does not produce real results...
# Posted By cccam server | 17/12/2015 00:44
Xarelto Pulmonary Embolism's Gravatar I'm able to bookmark your site and show the kids check out up here generally. I m fairly positive there likely to be informed a great deal of new stuff here than anyone.
# Posted By Xarelto Pulmonary Embolism | 19/12/2015 02:23
E3-1240v2's Gravatar show the kids check out up here generally. I m fairly positive there likely to be informed a great deal of new stuff here than anyone.
# Posted By E3-1240v2 | 19/12/2015 23:28
Assistant College's Gravatar Great Post This is also a very good post which I really enjoyed reading. It is not everyday that I have the possibility to see something like this..Thank You!
# Posted By Assistant College | 21/12/2015 02:44
do my homework's Gravatar Firstly create a CurrencyFormatter object, and specify the currency symbol, and any other formatting parameters that you require.
# Posted By do my homework | 26/12/2015 02:22
supreme garcinia cambogia canada's Gravatar was playing with some Java.io file writing stuff and I'd left it in there, it all works again now
# Posted By supreme garcinia cambogia canada | 27/12/2015 05:39
check this out's Gravatar Good to become visiting your weblog again, it has been months for me. Nicely this article that i've been waited for so long.
# Posted By check this out | 28/12/2015 02:01
check this out's Gravatar Your site and show the kids check out up here generally. I m fairly positive there likely to be informed a great deal of new stuff here than anyone.
# Posted By check this out | 29/12/2015 01:43
Unlock Her Legs's Gravatar Most of the time I don’t make comments on websites, but I'd like to say that this article really forced me to do so. Really nice post!
# Posted By Unlock Her Legs | 04/01/2016 00:56
Car Show Boards's Gravatar I’m now working with WordPress for a couple of with this blogs and forums nonetheless wanting to switch one of them over to your stand akin to you for a trial offer perform.
# Posted By Car Show Boards | 04/01/2016 22:14
adult traffic's Gravatar I’m now working with WordPress for a couple of with this blogs and forums nonetheless wanting to switch one of them over to your stand akin to you for a trial offer perform.
# Posted By adult traffic | 04/01/2016 23:29
cab service jaipur to delhi's Gravatar I was playing with some Java.io file writing stuff and I'd left it in there, it all works again now.
# Posted By cab service jaipur to delhi | 05/01/2016 02:24
The Bonding Code's Gravatar It was a wonderful chance to visit this kind of site and I am happy to know. thank you so much for giving us a chance to have this opportunity...
# Posted By The Bonding Code | 06/01/2016 23:36
cccam server's Gravatar This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free...
# Posted By cccam server | 07/01/2016 03:11
what to sell on amazon's Gravatar I have feel that this blog is really have all those quality that qualify a blog to be a one.I wanted to leave a little comment to support you and wish you a good continuation.
# Posted By what to sell on amazon | 09/01/2016 01:03
Franco Noval's Gravatar I thought it was going to be some boring old post, but it really compensated for my time. I will post a link to this page on my blog. I am sure my visitors will locate that extremely useful...
# Posted By Franco Noval | 11/01/2016 00:50
subscription boxes for men's Gravatar I’ve been thinking about writing a very comparable post over the last couple of weeks. I’ll probably keep it
# Posted By subscription boxes for men | 12/01/2016 22:49
jeni's Gravatar <a href="http://www.stocksourcing.com">www.stocksou...; Stock Sourcing provide a regular and reliable source of wholesale used laptops, mobile phones, TVs, computers and digital cameras at low prices
# Posted By jeni | 13/01/2016 22:53
Water removal's Gravatar I am happy to know. thank you so much for giving us a chance to have this oppo
# Posted By Water removal | 19/01/2016 03:50
Back to top