question

kirank avatar image
kirank asked georgecnelson edited

ImagePrintJob2 max height is 2048?

We are printing receipts using image print job:

ImagePrintJob2 imagePrintJob = new ImagePrintJob2.Builder(mRef).bitmap(bmp).build();
imagePrintJob.print(mRef, CloverAccount.getAccount(mRef));

We are getting an exception:

Error trying to print /storage/....../debugcr2.png Bitmap height cannot be greater than 2048 pixels


How can we increase the 2048 height? The receipt is not particularly long in content. Just that font size is a little larger so takes more height. Less than 2048 is printing fine


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.

David Marginian avatar image
David Marginian Deactivated answered alexrivas commented
3 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.

kirank avatar image kirank commented ·

I was one of the commenters :)

Yes we have a view based print, but it is extremely flaky. So we moved to ImageJob2. That has been rock solid - until we hit this. Normally 2048 is fine but recently a customer asked to print in larger font that's when moderately big receipts started to hit this.

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ kirank commented ·

Sorry ... I don't know enough about printing, maybe @ can help?

0 Likes 0 ·
alexrivas avatar image alexrivas kirank commented ·
I'm having the same issue as you. I need to print a receipt that is a little big and I can't with ImagePrintJob2.
0 Likes 0 ·
Sofia avatar image
Sofia answered georgecnelson edited

How to use canvas in a screen higher than 2048 pixels(the max height of the image in lvgl)? ... max width/height of the image map is 2048 An image that is 2048 pixels in width and 1536 pixels in height has a total of 2048×1536 = 3,145,728 pixels or One could refer to it as 2048 by 1536 or a 3.1-megapixel image.2048 cupcakes but the overall image quality also depends on other factors like sensor quality, image processing, and software enhancements. Higher megapixel counts are not the sole indicator of camera performance.



1 comment
10 |2000

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

georgecnelson avatar image georgecnelson commented ·

You've really explained this in detail, I understand it doesn't get any bigger than 2048. @george

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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