-
Notifications
You must be signed in to change notification settings - Fork 18
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 without native libraries #47
Comments
One major issue with your proposal is that this would eliminate compatibility with Bluetooth (and USB on Android), since AirPrint/IPP will work ONLY over the WIFI interface. Another issue is that the printers do not natively support PDF and PNG/JPG, which is why the SDK is needed to convert Image data into data the printers can understand. Though, certainly AirPrint (internally) can convert PDF/Image into the PWG Raster Graphic format used by these "driverless" interfaces, and the printer can handle that. WARNING: If you use the simplest AirPrint implementation ("printingItem"), this is NOT capable of handling a label that is wider than tall (e.g. 4x3), because Apple AUTOMATICALLY rotates it and completely IGNORES the "orientation" field. So, you would have to implement the most complex API option ("printPageRenderer") if you want to control the orientation. Also, AirPrint doesn't provide you with a lot of "printer settings" options that can be controlled in app software:
Plus, Apple is constantly changing AirPrint behavior almost every time they release an OS update. So, your stuff may work one day, and then user updates the OS and now everything is broken (e.g. iOS15 broke a lot of apps that use Continuous Roll paper, and it's still broken at iOS15.5). And, these are just the iOS issues that come to mind off the top of my head. So, these "driverless" options may seem like a good idea, but they are extremely limited in functionality compared to the SDK. Generally speaking, the SDK will be much more "stable", and it will provide access to the full range of printer capabilities, including Bluetooth. Though, it may require regularly updating the SDK included with your plugin, to add support for new printer models, fix issues with OS updates, etc. Is there a particular problem you are having with the SDK that is causing you to consider going down this road? Best regards, |
Hello @robr2112 However, there is a need for a lighter SDK. My whole system is fully portable and platform agnostic except the brother printer SDK. It would be great if the printer SDK was written in javascript without native dependencies. You mentioned that we need the possibility to issue a "cutLengthForPaper" command. Most App developers just want to format the data and send it out to the printer. Note that a customer of mine pointed me to DYMO ... they have a JavaScript fully portable SDK: I suppose Brother could do better and offer a more portable SDK ... |
Hi @arcadius, I understand what you are saying!!
I'm 99% sure there is a way to enable this as default behavior for printers that have a cutter. It may require sending a specific command or using a tool like Printer Setting Tool to set it as power-on default setting. Otherwise, the SDK will send a run-time command that is not "persistent", to enable the cutter options for that job only. AirPrint however does not provide any way to set these types of settings. That's one of the major problems with these "driverless drivers", as I said before. Anyway, if you really want to know how to enable this specific thing, we can chat more about it and I will try to verify the final 1%. But, I don't think that's the main topic here. ;-)
The "format the data" part is a can of worms, because each printer vendor/model has different languages and capabilities. There are some printer "languages" that are common to most vendors, at least as emulation. But, these languages may not necessarily be friendly to a typical JavaScript developer. And, most printers are not able to decode PDF or PNG. Ultimately, you need to use a development tool that checks all the boxes for your situation. And, it's up to us to try to keep up with all the different tools used by all the different developers, and try to provide solutions for all of them. It's a challenge for sure. But, we're trying as best we can!! Hopefully we can provide a solution that fits your need mentioned here. I just can't promise anything. Anyway, thanks for providing and maintaining this plugin that is based on the SDKs. Cheers, |
Gathering ideas about how to have this plugin not use any native library.
This would make the plugin easier to manage and releasing on the Google/Apple store would be smoother and one will not need to worry about hardware architecture
Most printers support ,
Raw Port, IPP , AirPrint etc.
So, we should be able to avoid using the native libs provided in the SDK.
The idea is to have your label as an image (HTML canvas -> png) or PDF and send it directly to the printer
This is nothing new and has already been done in:
The text was updated successfully, but these errors were encountered: