我有微电子的明星音乐。我已经阅读了文档(http://www.starmicronics.com/support/mannualfolder/starprnt_cm_en.pdf)第2-8节指出,您可以写入空白代码页。我已经遵循了这些说明,但我仍然无法按预期打印出来。我联系了支持,但他们基本上告诉我使用试错法,因为他们不知道。
它似乎总是打印一个字符串。下面是我正在使用的示例代码,只是为了测试,我为字体A发送了一个实心块,为字体B发送了一个零数据。
[commands appendBytes:
"\x1b\x1d\x3d\x00\x30"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00"
"\x1b\x1d\x74\xff\x80"
length:sizeof("\x1b\x1d\x3d\x00\x30"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00"
"\x1b\x1d\x74\xff\x80")-1];任何帮助这项工作的人都将不胜感激。
发布于 2016-08-27 00:09:57
最后,我使用命令ESC GS = n1 n2 da1 da2...保存字符,并使用命令Esc % = n打印字符,最终使其正常工作。
下面的示例将一个字符保存到空白代码页上的7F位置。这应该在每个应用程序启动时完成,因为它存储在RAM中,而不是NV中。
[commands appendBytes:
"\x1b\x26\x01\x01\x7f" //Save the following to position 7F
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00" //end of character
"\x1b\x25\x01\x7f" //Print the character
length:sizeof("\x1b\x26\x01\x01\x7f"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00"
"\xff\x00\xff\x00\xff\x00\xff\x00"
"\x1b\x25\x01\x7f")-1];在此之后切换回正常的代码页也是一个好主意,否则会有一些奇怪的副作用。这可以使用命令Esc GS t n来完成,其中n= 0。
[commands appendBytes:
"\x1b\x1d\x74\x00" //Switch back to normal code page
length:sizeof("\x1b\x1d\x74\x00")-1];https://stackoverflow.com/questions/39041943
复制相似问题