GithubHelp home page GithubHelp logo

Comments (4)

Florent75 avatar Florent75 commented on April 28, 2024

Hi there,

I do have the same issue.

I am working on a Samsung Tablet.

I have tried the example of the repository, everything is working and being printed.
Then I tried specific text for my project, everything is working and being printed.
Then I tried to add the printImage function and I got a "Image not found" error.

Here is the piece of code :
USBPrinter.printText("Bon d'achat valable chez :");
USBPrinter.printText("BOCOLOCO");
USBPrinter.printText("Magasin 1 & 2");
USBPrinter.printText("Tous les jours de la semaine");
USBPrinter.printText("Magnifique");
USBPrinter.printImage('https://sportshub.cbsistatic.com/i/2021/04/09/9df74632-fde2-421e-bc6f-d4bf631bf8e5/one-piece-trafalgar-law-wano-anime-1246430.jpg');
USBPrinter.printText("453.45 €");

What I have tried :

  • Local image using require
  • Adding width and height params
  • Changing URL

Nothing is working. Do you have any solution ?

Here is my config, it's a fresh new app created 2 weeks ago :
"react": "^18.0.0",
"react-native": "0.69.1",
"react-native-thermal-receipt-printer-image-qr": "^0.1.9",

Regards

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

thiendangit avatar thiendangit commented on April 28, 2024

@Florent75 i use this function to check you image url. you can try debugging here.

final Bitmap bitmapImage = getBitmapFromURL(imageUrl);
if (bitmapImage == null) {
errorCallback.invoke("image not found");
return;

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

Florent75 avatar Florent75 commented on April 28, 2024

Thanks.
I will have a look and get back to you.

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

Florent75 avatar Florent75 commented on April 28, 2024

Hi there,

I updated the sdk version and now the image with URL is working.

Regards

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.