react-native-star-prnt icon indicating copy to clipboard operation
react-native-star-prnt copied to clipboard

how to use png file on react-native-star-prnt.

Open panda919 opened this issue 6 years ago • 2 comments

now I am working on react native app using react-native-view-shot and react-native-star-prnt. I got png file for webview by using react-native-view-shot plugin. I gonna print this png file with react-native-star-prnt plugin. pls apply 'react-native print convert' text on your bid top. But this printer plugin doesn't support png, only bitmap. So i think I have to convert react native image module which convert png/jpg to bitmap. Or not How to use png data on printer?

panda919 avatar Sep 11 '19 12:09 panda919

The SDK will still process the file in PNG format, React-Native-View-Shot will return a URI which you can then use with the following command:

commands.push({appendBitmap: uri, width: STAR_TICKET_DPI_WIDTH})
await StarPRNT.print(emulation, commands, portName)

If you could provide some code I could help you with your problem!

dnlowman avatar Dec 16 '19 11:12 dnlowman

hey @dnlowman - How to figure out the correct value for STAR_TICKET_DPI_WIDTH in your snippet?

rockneverdies55 avatar Nov 19 '20 13:11 rockneverdies55