使用ColdFusion创建QR码 [英] Creating QR Codes with ColdFusion

查看:136
本文介绍了使用ColdFusion创建QR码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有任何方法与纯ColdFusion / cfscript产生QR码,而不依赖于外部API或JavaScript?

Is there any way with pure ColdFusion/cfscript to produce a QR code, without relying on external APIs or JavaScript?

推荐答案

否。 ColdFusion本身不能生成条形码。您需要单独的工具或库。它很容易安装一个java库,如 ZXing 。然后从CF生成图像。或者,您可以对生成条形码图像的外部服务器执行< cfhttp> 调用,或者基本上执行与javascript 相同的事情。您不需要为后两(2)个选项安装任何东西。但他们仍然依赖于外部资源。

No. ColdFusion cannot generate bar codes by itself. You need a separate tool or library. It is easy enough to install a java library, like ZXing. Then generate the images from CF. Alternately, you could do a <cfhttp> call to an external server that generates the bar code image for you, or basically do the same thing with javascript. You would not need to install anything for the latter two (2) options. But they still rely on an external resource.

底线你需要的不仅仅是ColdFusion。不能使用外部API或javascript的原因是什么?

Bottom line you need something more than just ColdFusion. What is the reason you cannot use either an external API or javascript? Because without either of those, you are probably out of luck.

根据评论进行编辑

如果限制是图片必须在本地生成,则可以使用上述链接中所述的ZXing或其他响应中提到的任何其他组件/例如 Joe的建议,它使用iText(虽然也基于ZXing)。

If the only restriction is the images must generated locally, then you can use ZXing as described in the link above -OR- any of the other components/libraries mentioned in the other responses, like Joe's suggestion which uses iText (though also based on ZXing).

这篇关于使用ColdFusion创建QR码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆