GithubHelp home page GithubHelp logo

Comments (8)

mufasilfaizal avatar mufasilfaizal commented on April 28, 2024 4

Are you able to solve it?

from react-native-thermal-receipt-printer-image-qr.

yaser-elbatal avatar yaser-elbatal commented on April 28, 2024 2

any way to print Arabic letters ?

from react-native-thermal-receipt-printer-image-qr.

Mohamed-kassim avatar Mohamed-kassim commented on April 28, 2024 1

@thiendangit this is a good workaround, yes but it will prevent using all good APIs provided by this package including print columns and others, you will need to implement full receipt with react native UI then print it as an image
also, it gives a bad performance printing image instead of just text
I know another package that is supporting changing codepage can u try to check its native code if u can clone it to yours?
https://github.com/mrefaie/react-native-esc-pos-sahaab

EscPos.setCodePage(config?.codePage);
it was having 2 issues, one for changing codepage and I think it's the easy part and the second was that the string was reversed, they solved it from the native side but I think I can push the string reversed from the js side

also, I found that ESC pos encoder can generate commands with codepage I will try it and give you feedback
let result = encoder .codepage('windows1251') .text('Iñtërnâtiônàlizætiøn') .codepage('cp737') .text('ξεσκεπάζω την ψυχοφθόρα βδελυγμία') .encode()

from react-native-thermal-receipt-printer-image-qr.

thiendangit avatar thiendangit commented on April 28, 2024 1

@Mohamed-kassim many tks! i'll try in weekend!

from react-native-thermal-receipt-printer-image-qr.

thiendangit avatar thiendangit commented on April 28, 2024

You can screen shot your screen and using image or base 64 to print!

https://github.com/gre/react-native-view-shot

z3049044734253_87c62fa8efe632609f32cfa5bdf5704a

from react-native-thermal-receipt-printer-image-qr.

thiendangit avatar thiendangit commented on April 28, 2024

@Mohamed-kassim is it working ?

from react-native-thermal-receipt-printer-image-qr.

Mohamed-kassim avatar Mohamed-kassim commented on April 28, 2024

@thiendangit I tested it more than once it's not working, but I think it's about printer mapping so I am trying again
let me explain it briefly
every printer have a list of codepages every codepage have value and page for every printer

the old package was taking the codepage index from the user as the user know what's the language he need to print with so he picks it from the printer configuration file -included image- then the package map it to the right hex code command >> and this is approach is very good
for example I need to assign cp864 for old package I assign 22 from this image for encode I assign cp864
photo_2021-12-27_22-45-13

but esc pos encoder takes the value, not the index which maps for every printer differently u can check their source files for mappings so I think my printer mappings are different so it's not working I will try again with custom mapping to check if it's working

sorry for being late I will try to test It again as fast as possible

from react-native-thermal-receipt-printer-image-qr.

MaheshKaemSolutions avatar MaheshKaemSolutions commented on April 28, 2024

any success?

from react-native-thermal-receipt-printer-image-qr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.