You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows10下使用qrencode生成带换行二维码的问题

在Windows 10中解决qrencode二维码内容换行问题

你在Windows 10下用qrencode生成二维码图片成功,但用\n无法实现内容换行——原因是Windows命令提示符(CMD)不会把\n解析为换行符,以下是两种可行的解决方法:

方法一:直接在命令行输入多行内容

在CMD中输入命令时,用双引号包裹所有内容,写完一行后直接按回车继续输入下一行,CMD会自动保留这些换行:

d:\qrencode -o qrcode.png "INDO GERMAN ALKALOIDS
Unique ID: ABC-123456789
API-Name: ABCDEFGH
Brand: Indo-101
Address: Inga House, Mahakali Road, Andheri-East, Mumbai-400093,
Tel-022-28202932/33,
Mobile: 9833942075,
Batch No.: XYZ888999000,
Batch Size: 1020,
Mfgd.Date: 29-12-2022,
Expiry Date: 31-12-2023,
Container Code: RRR-101020,
Mfgr Lic.No.: ------------,
Storage Instruction: Store in cool area 20deg"

方法二:通过文本文件传递内容

  1. 新建一个文本文件(比如content.txt),在里面按需求写好带换行的内容:
INDO GERMAN ALKALOIDS
Unique ID: ABC-123456789
API-Name: ABCDEFGH
Brand: Indo-101
Address: Inga House, Mahakali Road, Andheri-East, Mumbai-400093,
Tel-022-28202932/33,
Mobile: 9833942075,
Batch No.: XYZ888999000,
Batch Size: 1020,
Mfgd.Date: 29-12-2022,
Expiry Date: 31-12-2023,
Container Code: RRR-101020,
Mfgr Lic.No.: ------------,
Storage Instruction: Store in cool area 20deg
  1. 在CMD中执行命令,让qrencode读取这个文件的内容:
d:\qrencode -o qrcode.png < content.txt

内容的提问来源于stack exchange,提问作者Fred

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.05 18:01:21