I'm trying to find the best approach to send data to print (Thermal and HP laser A4) connected to my Ubuntu system.
I can access printer by writing in /dev/usb/lp*
. What is the best approach to do it using c++ as programming language.
Thanks,
I'm trying to find the best approach to send data to print (Thermal and HP laser A4) connected to my Ubuntu system.
I can access printer by writing in /dev/usb/lp*
. What is the best approach to do it using c++ as programming language.
Thanks,
As Ubuntu and a lot of other Linux distros use CUPS as printing system, I would recommend that your app only communicates with CUPS. Like that you can avoid having to implement printer specific stuff, but you have a generic way that should work on any Linux distro supporting cups.
See here for a handy example for printing using cups: Linux/CUPS printing example/tutorial?