leesiongchan / react-native-esc-pos

A React Native ESC/POS module to help you connect to your ESC/POS printer easily.
MIT License
80 stars 84 forks source link

Parametrized Image Width Offset #53

Closed falquinho closed 4 years ago

falquinho commented 4 years ago

Hello. For my project the Default Image Width Offset was getting in the way. It basically just scale the image down. I do not understand it's purpose. So I made some changes to make it parameter. I exposed a new method: printImageWithOffset and created a new tag that applies a width offset if it's in the same line as the image tag. I also changed the default offset to 0.

leesiongchan commented 4 years ago

Interestingly, I can't recall why did I set the default value to 100, maybe a mistake? Can you update the README as well? Thank you for your contribution!

falquinho commented 4 years ago

I agree that It should be an option in the IMG tag. I did like this because It was faster. As soon as I haver time i'll modify It.