node.js - node-qrcode 无法设置更大的宽度
问题描述
我正在使用 node-qrcode https://github.com/soldair/node-qrcode
我可以成功生成二维码并将其写入文件。但我需要使文件更大。但是,从节点内部,当我传递宽度选项时,它不会听它。我只能从 CLI 中让它工作,这有利于测试,但从长远来看是行不通的。
这是我的代码片段:
const QRCode = require('qrcode');
//generates the QR code png
function generateQR(customer){
let qrfilename = customer['phone'] + '.png'
QRCode.toFile(qrfilename, customer['phone'], {width: '600'});
}
当我从命令行运行时,它可以工作
./qrcode -d F00 -w 600 -o out.png "some text"
解决方案
推荐阅读
- firebase - 限制对 Firebase Firestore 和 Storage 的访问
- rx-java2 - 使用 Single.zip 的并行 API 请求未处理所有错误
- typescript - 在 express-ws 应用程序和打字稿中使用 Sessions
- wpf - 使用 caliburn micro 将所选项目绑定到组合框
- python - Pandas - 删除包含 Nan 的行,然后删除任何关联的行
- jmeter - 使用 Apache Jmeter 负载测试从 vsts 构建启用负载测试,但从运行持续时间我只看到很少的值
- reinforcement-learning - 强化学习:如何使用模拟器创建新的游戏环境
- c - 带有子文件夹和几个 .c 文件的 C makefile(错误。ld)
- c# - 如何使用 Unity 在 ARKit 中隐藏用于平面检测的平面预制件?
- powershell - 受域保护的 pfx 需要什么密码?