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

The printer only prints 80% of the base64Image #30

Open
gonzalopaniagua opened this issue Oct 21, 2020 · 1 comment
Open

The printer only prints 80% of the base64Image #30

gonzalopaniagua opened this issue Oct 21, 2020 · 1 comment

Comments

@gonzalopaniagua
Copy link

Hello guys,

I achieve to print through base64 but I'm having this issue, when I try to print a base64 image my printer prints only the 80% of the image and then it prints the 20% in the next print.

It's a problem of the printer? Of my code?

I am using the plugin in Ionic.

Here's my image Base64 -> https://pastebin.com/BY45Sa6W

Code that I have in my print.page.ts ->

printImage(){
    this.executing = true;
    this.printBase64().then( result => {
      this.executing = false;
    })
  }

printBase64(): Promise<any>{
    return new Promise((resolve, reject) => {
      BTPrinter.printBase64(function(data){
          console.log("Printed Base64");
          resolve(data)
      },function(err){
          console.log(err);
          reject(err)
      }, this.skere.label, 2)
    })
  }
@andreszs
Copy link
Contributor

andreszs commented Nov 18, 2020

I had no problems printing your original, unedited base64 image with the cheapest possible BT printer:

image

Feel free to try my plugin demo app.

image

Maybe you should try reducing the size of the image to use less resources.

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