print-help/README.md
2024-03-13 10:06:53 +08:00

708 B

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();