Im Using Citizen POSPrinter to print Digital Signature from my android application using bluetooth. But it prints only the byte[] array in the printer instead of printing the signature. I dono where im wrong. help me. Thanks in advance..
ESCPOSPrinter posPtr = new ESCPOSPrinter();
String root = Environment.getExternalStorageDirectory().toString();
String fname = "Sign.jpg";
file = new File (root, fname);
path = file.getAbsolutePath();
if (file.exists())
file.delete();
try {
out = new FileOutputStream(file);
signature.compress(Bitmap.CompressFormat.PNG, 90, out);
out.flush();
out.close();
} catch (Exception e) {
e.printStackTrace();
}
try {
posPtr.printBitmap("//sdcard//Sign.jpg", CMPPrint.CMP_ALIGNMENT_RIGHT);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();