Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

[thermalprinter] Bitmap printing doesn't work #119

Description

@smnvdl

Today I wanted to print an image (bitmap) captured with the Pi's camera on the thermal printer. The bitmap is captured properly, but the printer only prints "empty" lines instead of the picture. This is my code snippet:

private` void printImage(Bitmap bitmap) {
    if (bitmap != null) {
      Bitmap resizedBitmap = Bitmap.createScaledBitmap(bitmap, 384, 256, false);
      // Print a bitmap
      mThermalPrinter.enqueue(new ThermalPrinter.BitmapJob().printBitmap(resizedBitmap));
    } else {
      Log.d(TAG, "Bitmap == null");
    }
  }

I also tried printing other bitmaps created from drawable resources but nothing changed. The logcat doesn't show any errors or warnings at all.

The printer is initialized in the onCreate() method of the activity. The printer itself is on firmware v2.69, printing texts works without issues.

mThermalPrinter = new ThermalPrinter("UART0");

Has anyone experienced similar issues? #

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions