for (int i = 0; i < invCode.length(); i = i + 10) {
TscDll.sendcommand("TEXT 350," + (75 + i * 3) + ",\"0\",12,3,\" " + invCode.substring(i,i + 10 < invCode.length() ? i + 10 : invCode.length()) + "\" \r\n ");
}//invCode为打印的内容
String SC1="这是一段文字";
byte[] QQ2 = new byte[1024];
try {
QQ2=SC1.getBytes("GB2312");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
TscDll.sendcommand("TEXT 20,30,\"FONT001\",2,\"");
TscDll.sendcommand(QQ2);
TscDll.sendcommand("\"\r\n");