Androidセルを介してBluetoothプリンターにテキストを送信しています。プリンターとデバイスの両方が Bluetooth 経由で接続されています。 それは正常に機能しており、紙に目的のテキストを取得しています。
私の質問は:
プリンターはデフォルトfont size
のテキストを使用しています。印刷する文字のフォントサイズを変更したい。
どうすればこれを達成できますか??
ブルートゥース接続の後にテキストを印刷する私のコードは次のとおりです。
private void connect_print(BluetoothDevice bluetoothDevicess) {
// some code
printData();
// some code
}
printData() メソッド
private void printData() {
// TODO Auto-generated method stub
String str = new String("This is the text sending to the printer");
String newline = "\n";
try {
out.write(str.getBytes(),0,str.getBytes().length);
Log.i("Log", "One line printed");
} catch (IOException e) {
Toast.makeText(BluetoothDemo.this, "catch 1", Toast.LENGTH_LONG).show();
e.printStackTrace();
Log.i("Log", "unable to write ");
flagCheck = false;
}
try {
out.write(newline.getBytes(),0,newline.getBytes().length);
} catch (IOException e) {
Log.i("Log", "Unable to write the new line::");
e.printStackTrace();
flagCheck = false;
}
flagCheck = true;
}
font size
プリンターに送信しているテキストのとを変更しfont style
て印刷したい。これを達成するのを手伝ってください。誰かがリンクを提案できるなら、私も彼/彼女に感謝します.
この問題の解決策を見つけるのを手伝ってください