Server5.0实现QR码打印功能
- 
先后试过三种方法: 
 1、调用codsoft 的模板文件
 2、在RML报表里通过调用数据库的函数字段(binary),由于在Server5.0.16在循环打印图像时存在BUG,此问题在6.1中才解决,所以放弃了
 3、升级reportlab来支持二维码(最终采用)
 实现方法如下:
 (1)升级reportlab2.2到reportlab2.5
 (2)修改: bin\report\render\rml2pdf\trml2pdf.py代码如下:
 from reportlab.graphics.barcode import usps
 + from reportlab.graphics.barcode import createBarcodeDrawing
 except Exception, e:
 return None
 args = utils.attr_get(node, [], {'ratio':'float','xdim':'unit','height':'unit','checksum':'int','quiet':'int','width':'unit','stop':'bool','bearers':'int','barWidth':'float','barHeight':'float'})
 codes = {
 + 'qrcode': lambda x: createBarcodeDrawing('QR', value=x, **args),
 'codabar': lambda x: common.Codabar(x, **args),
 'code11': lambda x: common.Code11(x, **args),
 'code128': lambda x: code128.Code128(x, **args),
 'standard39': lambda x: code39.Standard39(x, **args),
 'standard93': lambda x: code93.Standard93(x, **args),
 (3)在RML文件中加入如下标签:
 <barCode code="qrcode" x="0.1cm" height="" quiet="0" fontName="Times-Roman" barWidth="50" barHeight="50" valign="CENTER" alignment="CENTER">[[str(o.ref)]]</barCode>