Search in sources :

Example 6 with PrintHelper

use of android.support.v4.print.PrintHelper in project run-wallet-android by runplay.

the class ChooseSeedEditFragment method printImage.

private void printImage(Bitmap bitmap) {
    try {
        PrintHelper photoPrinter = new PrintHelper(getActivity());
        photoPrinter.setScaleMode(PrintHelper.SCALE_MODE_FIT);
        photoPrinter.printBitmap("Ink check", bitmap);
    } catch (Exception e) {
        Snackbar.make(view, getActivity().getString(R.string.print_failed), Snackbar.LENGTH_SHORT).show();
    }
}
Also used : PrintHelper(android.support.v4.print.PrintHelper) WriterException(com.google.zxing.WriterException)

Aggregations

PrintHelper (android.support.v4.print.PrintHelper)6 FileNotFoundException (java.io.FileNotFoundException)3 Bitmap (android.graphics.Bitmap)2 WriterException (com.google.zxing.WriterException)1 Photo (us.koller.cameraroll.data.models.Photo)1