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 base64 pdf #286

Open
seepot opened this issue Dec 29, 2021 · 3 comments
Open

print base64 pdf #286

seepot opened this issue Dec 29, 2021 · 3 comments

Comments

@seepot
Copy link

seepot commented Dec 29, 2021

how to print base64? only print string of base64

Screenshot_20211229-095728_Print Spooler

@K-sivasankar
Copy link

@seepot ,
Your base64 should be like 'base64://JVB..... in cordova.plugins.printer.print('base64://JVB.....');
You can split the value from your variable like below

 cordova.plugins.printer.print("base64://"+blobvariable.split('base64,')[1]); // Replace blobvariable  string with your blob variable.

@martinneumann
Copy link

@K-sivasankar Does not work for me. The MIME type results to null, which causes the app to crash upon printing.

@Seth-Know
Copy link

I had this problem for well over a year now and still trying to find a good solution. Instead of using this cordova-plugin-printer repo, see this forked project here and review the commits:

https://github.com/katzer/cordova-plugin-printer/compare/master...jeffchee-asm:cordova-plugin-printer:master

ONLY FOR ANDROID, use pdfbase64: instead of base64: and for iOS continue using base64:

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

4 participants