Closed jefelon closed 1 year ago
?
The plugin resizes the image before printing. To get the best result, you can the following.
Set the alignment to center while sending the base64 for print.
And you can try opening BluetoothPrinter.java file (not the one in the plugins folder, but the one inside android/src folder) and find the method printBase64, find the resizeImage function which has 3 parameters, first is the image itself, second is the height, third one is the width.
The default is
bitmap = decodedBitmap;
int mWidth = bitmap.getWidth();
int mHeight = bitmap.getHeight();
bitmap = resizeImage(bitmap, 48*8, mHeight);
You can try changing 48*8 to get the size you want, it still does not print full width, but better than the current size. For me setting size 560 worked the best with center align
printBase64 reduces the image size and there is no way to send something to make something bigger. The original size is adequate, but this plugin resizes it.