question

Vishal avatar image
Vishal asked sam Deactivated commented

What are image formats support PrintImage

Hi

I am working on remote-pay-windows clover sdk 1.0 with clover mini device.

What are the image formats support for PrintImage method? Should i use any specific format like depth or RGB or Gray or any resolution?

Please clarify the PrintImage in detail.

Print
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sam avatar image
sam Deactivated answered sam Deactivated commented

Our SDK accepts an Android Bitmap object, which is not a BMP file (it's an uncompressed in-memory representation of the image data).

You can print any image that can be decoded to an Android Bitmap. That includes JPG and PNG, or any way you choose to manually construct the Bitmap object including drawing to a Canvas and converting to the Bitmap.

It requires a Bitmap object, which you pass into PrintImage. https://github.com/clover/remote-pay-...

You can read more about creating Bitmap object here: https://developer.android.com/referen...

8 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Vishal avatar image Vishal commented ·

Hi Sam

Thanks for the information. Will try update you.

0 Likes 0 ·
Vishal avatar image Vishal commented ·

Hi Sam

I tried jpg image with following code.

Bitmap printImage = new Bitmap("d:\receipt.jpg"); cloverConnector.PrintImage(printImage);

But nothing printing. Anything wrong with this code?

I can't able to print image from remote-pay-windows clover SDk1.0 application.

0 Likes 0 ·
sam avatar image sam commented ·

The bitmap object will need to be an Android Bitmap object. I've changed my answers to reflect this. Apologizes for the confusion.

0 Likes 0 ·
Vishal avatar image Vishal commented ·

Hi Sam

I tried Bitmap image not working.

I am getting following error while using PrintImage method with Bitmap(sample.bmp) "The Clover transport layer can see the USB device, but encountered an error when attempting to send it a message. Try Physically disconnecting/reconnecting the Clover device"

Kindly do the needful. thanks

0 Likes 0 ·
Vishal avatar image Vishal commented ·

Hi Sam

Can you display simulate the error while printing the image?

Check and revert it.

0 Likes 0 ·
Show more comments
sam avatar image
sam Deactivated answered

Our SDK accepts an Android Bitmap object, which is not a BMP file (it's an uncompressed in-memory representation of the image data).

You can print any image that can be decoded to an Android Bitmap. That includes JPG and PNG, or any way you choose to manually construct the Bitmap object including drawing to a Canvas and converting to the Bitmap.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community