Delphi7使用二维码

参考:http://jingyan.baidu.com/article/e75057f2ad6481ebc81a897b.html

首先下载对应的 dll (已经上传到博客园文件)

然后就是Delphi代码了:

function SetPdfConFile(confile: PChar):PChar;stdcall;external 'EnCodePdf.dll';
function EnPdfText(txtdata:PChar; outfile:PChar):PChar;stdcall; external 'EnCodePdf.dll'

SetPdfConFile(PChar('MakeBarCode.ini')); //加载配置
EnPdfText(PChar('123456'),PChar('pdf417.bmp'));  //将文本保存成二维码图片

 

posted @ 2017-06-22 19:38  Mo  阅读(3137)  评论(1编辑  收藏  举报