lib/zebra/print_job.rb in zebra-zpl-1.0.0 vs lib/zebra/print_job.rb in zebra-zpl-1.0.1

- old
+ new

@@ -26,10 +26,13 @@ # existent_printers = Cups.show_destinations # raise UnknownPrinter.new(printer) unless existent_printers.include?(printer) # end def send_to_printer(path) - puts "* * * * * * * * * * * * Sending file to printer #{@printer} at #{@remote_ip} * * * * * * * * * * " + puts "Sending job to #{printer} printer on #{remote_ip}" + # Try UNIX first `lp -h #{@remote_ip} -d #{@printer} -o raw #{path}` + rescue # Must be Windows + `lpr -S #{@remote_ip} -P #{@printer} -o raw #{path}` end end end