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

Printing failed #20

Closed
firdaus48 opened this issue Jan 28, 2020 · 10 comments
Closed

Printing failed #20

firdaus48 opened this issue Jan 28, 2020 · 10 comments

Comments

@firdaus48
Copy link

hi
I am getting following error after calling printViaSDK.

Error: "Unexpected Internal System Error: IllegalArgumentException"

using printer brother QL-1110NWB

this is my code
let image = "isbase64Image"; //sample actually use base64
cordova.plugins.brotherPrinter.printViaSDK(image, function (printResult) {
//var printResult = callback;
console.log(printResult);
},function (err){
console.log(err);
});
Thank you. please help

@arcadius
Copy link

QL-1110NWB seems not supported at the moment
Are you able to look at the code and fix this?

@firdaus48
Copy link
Author

i have tried to fix this issue, but no idea,
do you have any solusion?

@firdaus48
Copy link
Author

what if i use the other model like epson ?
can i use this plugin ?

@robr2112
Copy link

Support for QL-1110NWB was added to the SDK in v3.1.5, per the SDK release notes here:
https://support.brother.com/g/s/es/htmldoc/mobilesdk/about/release-notes-ios.html

The SDK framework currently included with this plugin is v3.1.1, per the info.plist file inside the framework:
CFBundleShortVersionString
3.1.1

So, you need to update the SDK if you require support for the QL-1110NWB printer.

You may download the latest SDK here:
https://www.brother.co.jp/eng/dev/mobilesdk/download/index.aspx

NOTE: Beginning with SDK 3.1.10 and later, the framework is now a Dynamic library, which requires it to be "embedded" in the application.

And, no, you will not be able to use this plugin with any non-Brother printer model, at least when using the image printing method.

@firdaus48
Copy link
Author

hi @robr2112
thank u for your response,

how to update the new SDK to this plugin ?

@robr2112
Copy link

Replace the BRPtouchPrinterKit.framework in src/ios/lib folder with the latest download version.

The SDK APIs are mostly the same so it shouldn’t require much (if any) modification to the rest of the plugin, though I’m not certain of that(as I’m not expert with this plugin). The new SDK should recognize the QL-1110NWB printer model name.

The biggest challenge may be to change the plugin project settings to “embed” the framework (as I mentioned last time). I’m not sure how to do that in Cordova, ie outside of Xcode. But this should be a simple change.

Hopefully this gets you moving forward.
I support the SDK but I’m not expert with this plugin.

@firdaus48
Copy link
Author

hi @robr2112

thank u very much for your suggest . finally its works

@arcadius
Copy link

@robr2112 , would it be possible you submit a pull request for the framework upgrade?
Thanks

@robr2112
Copy link

@arcadius , I'm not sure why you would need me to do a pull request? Can't you just download the latest SDK and integrate it? (of course, beware the new dynamic framework requires embedding, as mentioned already in this thread).

The SDKs (both iOS and Android) update somewhat regularly, so IMO it's a good idea to check these updates once in a while.

@arcadius
Copy link

Issuue was confirmed resolved in #20 (comment)

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

3 participants