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

Need example for printing images #16

Closed
venky2604 opened this issue Aug 21, 2021 · 8 comments
Closed

Need example for printing images #16

venky2604 opened this issue Aug 21, 2021 · 8 comments
Labels
question Further information is requested

Comments

@venky2604
Copy link

No description provided.

@tr3v3r
Copy link
Owner

tr3v3r commented Aug 22, 2021

@venky2604 , it already exists. Please see the example folder. BTW you can run it to test how everything works

@tr3v3r tr3v3r added the question Further information is requested label Aug 23, 2021
@tr3v3r tr3v3r closed this as completed Aug 23, 2021
@venky2604
Copy link
Author

how to print base64 image? I tried to print base64 image but it did not work.
const printing = new EscPosPrinter.printing(); const status = await printing .initialize() .imageBase64(img, 540) .cut() .send();

@tr3v3r
Copy link
Owner

tr3v3r commented Aug 23, 2021

For now, printing from the base64 source is not stable. We need to investigate what is the problem with this method.

So I'd recommend print image from assets folder instead.

@tr3v3r tr3v3r reopened this Aug 23, 2021
@venky2604
Copy link
Author

I need to print remote image. Is there any solution to print remote image uri ?

@tr3v3r
Copy link
Owner

tr3v3r commented Sep 13, 2021

@venky2604 I think I need some time to investigate why current implementation about base64 doesn’t work, so then I think it will possible print from remote source.

@venky2604
Copy link
Author

When I changed Base64.URL_SAFE to Base64.DEFAULT in

byte[] decodeBase64ImageString = Base64.decode(base64ImageString, Base64.URL_SAFE);
it is working.

@tr3v3r
Copy link
Owner

tr3v3r commented Sep 14, 2021

@venky2604 interesting.. thanks for the help! I’ll try to take a look on the problem for iOS as well. If I find solution then I’ll release new version with the fix

@tr3v3r
Copy link
Owner

tr3v3r commented Oct 12, 2021

@venky2604 just released a new version with printing from base64 support
Check ver. 1.1.0

here the docs: https://github.com/tr3v3r/react-native-esc-pos-printer/blob/main/docs/PRINTING.md#base64-image

@tr3v3r tr3v3r closed this as completed Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants