Guest User

Untitled

a guest
Aug 15th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. How to convert a string into Image and print that image in a bluetooth printer in Android
  2. String cpclConfigLabel = "Purchy No:";
  3. byte[] configLabel = cpclConfigLabel.getBytes();
  4. Log.e("Befire Bimta",""+configLabel);
  5.  
  6. Bitmap bitmap = BitmapFactory.decodeByteArray(configLabel , 0, configLabel .length);
  7.  
  8. View viewToBeConverted;
  9. // do stuff on the View
  10. viewToBeConverted.buildDrawingCache(true);
  11. Bitmap bitmap = widget.getDrawingCache(true);
  12. viewToBeConverted.destroyDrawingCache();
Add Comment
Please, Sign In to add comment