Go to file
陶林 ce4916d3a1 feat: Buffer 2024-03-14 08:36:10 +08:00
src feat: Buffer 2024-03-14 08:36:10 +08:00
.gitignore feat: init 2024-03-11 14:15:30 +08:00
README.md feat: 添加注释 2024-03-13 10:06:53 +08:00
build.config.ts build: 1.0.3 2024-03-11 18:18:41 +08:00
package.json feat: Buffer 2024-03-14 08:36:10 +08:00
pnpm-lock.yaml feat: 中文 2024-03-13 22:44:10 +08:00
tsconfig.json feat: init 2024-03-11 14:15:30 +08:00

README.md

https://www.npmjs.com/package/@taoya7/print-help

PDF文档

https://wiki.taoya.art/s/6712b96b-c67e-4e17-b3f7-ba12e7d146bf

注意

200 DPI: 1 mm = 8 dots

300 DPI: 1mm = 12 dots

在公制系统下, 在参数 m 与 “mm” 之间必须要有空格分隔

示例

import { FONTMUL, FONTTYPE, LabelCommand, ROTATION } from '@/command/Label'

function main() {
    let label = new LabelCommand(50, 30, 0);
    label.addText(0, 0, FONTTYPE.FONT_1, ROTATION.ROTATION_0, FONTMUL.MUL_1, FONTMUL.MUL_1, 'Hello World');
    var command = label.getCommand();
    console.log(command);// 获取字节码
    console.log(label.getCommandStr(command)); // 转换命令字符串
}
main();