Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print Image Example not working on React Native #20

Open
rafaelnco opened this issue Jun 28, 2022 · 2 comments
Open

Print Image Example not working on React Native #20

rafaelnco opened this issue Jun 28, 2022 · 2 comments

Comments

@rafaelnco
Copy link

hello guys! i am using the latest version of your library, could get everything to work BUT the image printing, which is exiting with an error: [Error: unrecognised content at end of stream

could you please help me with this? i think it is something related to running node libs to make pngjs work?

package.json:

  "dependencies": {
    "react": "~16.11.0",
    "react-native": "~0.62.2",
    "@tillpos/xml-escpos-helper": "^0.2.3",
    "node-libs-react-native": "^1.2.1",

metro.config.js:

module.exports = {
  resolver: {
    extraNodeModules: {
      ...require('node-libs-react-native'),
    }
  },
};

template and base64 image content exactly as following example https://github.com/hitz-group/xml-escpos-helper/blob/master/examples/src/printImage.ts

@Amigs
Copy link

Amigs commented Jul 11, 2022

hi
In the dependency pngjs it is throwing the following error, that dependency is for images so maybe it will produce yours.
pngjs/pngjs#290

@rafaelnco
Copy link
Author

hey @Amigs ! thank you for your feedback! i remember having this problem a couple times but dont remember how exactly it stopped happening, really sorry for this, i am trying to remember something i did for it to work so i could share in this thread

but my feedback for now is that i have been able to use your lib and it is perfect, resolved my issue elegantly i really appreciate your work,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants