Closed justinb-dd closed 2 months ago
Hi @justinb-dd, the actionPrintImage() does not support base64 encoded pdf.
The image types the printers supports are png/jpeg/jpg and so you can encode those as base64 and it would print.
@justinb-dd We are afraid it cannot be printed the PDF data by actionPrintImage()
method, as @atorisemofe have suggested.
If you want to print PDF data, please convert it to png or other formats once. The following information may give you some hints.
https://stackoverflow.com/questions/61637191/how-to-convert-pdf-to-image-in-reactjs
With TSP100III or IV, our PassPRNT app supports printing base64-encoded PDFs by sending data to PassPRNT via a URL scheme. https://star-m.jp/products/s_print/sdk/passprnt/manual/android/en/data_specifications.html#pdf
@atorisemofe Thank you very much for your comment!
Description
Does .actionPrintImage() support passing in a base64 pdf?
Whenever I try to use .actionPrintImage() with a base64 pdf I get an invalid source error. According to the docs I should be able to pass in
base64
data. But no matter what I try I can't get it to work.Your device where the bug occurs
Your printer
Your development environment
ProductName: macOS ProductVersion: 12.5.1 BuildVersion: 21G83
Additional context
this.testBytes
to the command.data:application/pdf;base64,${b64_data}