Skip to content

Coldfusion CFML QR-Code Generator - Write QRCode to a file with less effort

Notifications You must be signed in to change notification settings

Conrad-T-Pino/CFQRCode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CFQRCode

Coldfusion CFML QR-Code Generator - Write QRCode to a file with less effort

INSTALL

  1. Add ZXing QRCode libraries:
    • lib/zxing-3.5.0-core.jar
    • lib/zxing-3.5.0-javase.jar
  2. Put JAR files in lib folder on your CFML Engine CLASSPATH
    • Coldfusion: <CFPATH>/runtime/lib
    • Railo: <CFProject>/WEB-INF/railo/lib
    • Lucee: <CFProject>/WEB-INF/lib
  3. Add the CFC set to your project
    • src/info/jlepage/Barcode.cfc
    • src/info/jlepage/QRCode.cfc
    • src/info/jlepage/ZXing.cfc
  4. Play with it!

CFML Sample:

<cfset qrCode = new info.jlepage.QRCode() />
<cfset qrCode.setData("Hello World!") />
<cfset qrCode.writeToFile("myQRCode.png") />

CFScript Sample:

<cfscript>
qrCode = new info.jlepage.QRCode();
qrCode.setData("Hello World!");
qrCode.writeToFile("myQRCode.png");
</cfscript>

CFScript direct image binary:

<cfscript>
qrCode = new info.jlepage.QRCode();
qrCode.setData("Hello World!");
imageBinary = qrCode.readBinary();
</cfscript>

Can be more easy? 😃

More samples in:

  • src/index.cfm
  • src/barcode.cfm

ZXING

Please visite the ZXing project at:
https://github.com/zxing/zxing

ZXING is under Apache License 2.0
http://www.apache.org/licenses/LICENSE-2.0
https://github.com/zxing/zxing/blob/master/LICENSE

LICENCE

Copyright (c) 2013, Jerome Lepage http://www.jlepage.info

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
http://creativecommons.org/licenses/by-sa/3.0/

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Coldfusion CFML QR-Code Generator - Write QRCode to a file with less effort

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages

  • ColdFusion 100.0%