Here is where you need to understand how the printer is implemented on your system. In the case of Windows, there are several system calls you can use to control the printer. These calls have different names in Linux. On the other hand, if the printer is an older printer, it may use PostScript.
You will be best off controlling the printer by using the system calls for the OS on your computer.
Please check your printer driver manual and see whether it provides any such API, most likely you will not be able to control printer directly. But you can use protocol like SNMP to control printer.
Comment