question

pharekar avatar image
pharekar asked Jeffrey Blattman commented

MultipleImagePrintJob is not working

Hey folks!

I am trying to print images (`.png` format) using `MultipleImagePrintJob`.

val uriString = "file:///data/data/com.example/cache/tmp835661865.tmp/page0%202.png"
val multipleImagePrintJob = MultipleImagePrintJob.Builder().uriStrings(uriString).build()
val jobId = printJobsConnector.print(printer, multipleImagePrintJob)
Note that I am testing on Star TSP100 printer which is supported by Clover. (on Clover Mobile)

After running this code, it says `Image sent to printer` However printer does not print. Just as a side note, printer works fine when I print the same with `ImagePrintJob` wherein instead of creating `uriString` I'm creating bitmap object.

So why is it that only `MultipleImagePrintJob` is not working?

Also, it would be great if printJobConnector handles error properly instead of just throwing generic errors. It would be really nice to know why print job failed (is it because of unsuitable size of the image? or is it because printer is out of paper? etc.)

Help me out. Let me know if I'm missing something.

Thanks!
Clover Mobile
2 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.

Dan avatar image Dan ♦ commented ·

Just a guess, but in the ImagePrintJob you're printing a bmp while the uri string you provided is a png. The TSP100 might not support pngs.

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

Read this https://community.clover.com/page/asking-questions. Providing logcat would help.

0 Likes 0 ·

0 Answers

Welcome to the
Clover Developer Community