Printers
Printers is not a lib for printer drivers or cups. Printers is a simple lib for running "native" printing commands in unix (lp/lpstat) and windows (lpr/wmic) systems.
Printer can provide a list of printers available on the system and perform document printing.
Behavior
get_printers
Return a vector of available printers
print .print
Request print of a temp file after write they
print_file .print_file
Request print of specific file from path
get_printer_by_id
Try get and return a single printer by your ID
get_printer_by_name
Try get and return a single printer by your name
NOTE: get_printer_by_id and get_printer_by_name yet is a simple utility, this functions just apply filters over call get_printers() result. They are improved on future to be more performatic
Example
use printers;
System Requiriments
Windows / LPD
For Windows is necessary turn on LPR and LPD running on localhost to perform lpr command to print
Unix / Cups
For Unix is necessary cups service running to perform lp command to print