This repository has been archived by the owner. It is now read-only.

Printer not found on OS X #131

Closed
tresf opened this Issue Jan 5, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@tresf
Contributor

tresf commented Jan 5, 2016

There'a bug with the printer Class Name on OSX where the class name can prevent the printer from being found.

I'm almost certain this is a mac-only bug and it seems to have surfaced with OS X 10.11 El Capitan.

@klabarge can you please reproduce on 10.11 and update the documentation here:

https://qz.io/wiki/setting-up-a-raw-printer-in-osx#adding-a-printer-class

We currently state that the Class name can't match the Printer name, but according to the emails we're receiving this may be slightly incorrect.

@klabarge

This comment has been minimized.

Contributor

klabarge commented Jan 6, 2016

  1. The statement that the Class Name cannot match the Printer Name is correct. CUPS does not allow you to create a Class Name that already exists as a Printer Name.

    image

  2. In my testing I used the following information:

    Printer Name: printer_name
    Printer Description: printer_name

    Printer Class: printer_class
    Class Description: printer_name

    • Using "Detect Printer" resulted in:

      image

    • Using "List All Printers" resulted in:

      image

    • printer_name showed up in System Preferences

      image

  3. When I changed the Class Description to printer_name, both printer_name and printer_class showed up in "List All Printers"

    image

    • After changing the Class Description, the Printer Name in System Preferences changes

    image

In all my testing, I was able to use "Detect Printer" to find the printer.

This may require further testing, as it is clear that there is a discrepancy between the Printer name/description and the Printer class/description

@klabarge

This comment has been minimized.

Contributor

klabarge commented Jan 11, 2016

The only printer attached to the system was Apple.

CUPS Printer

  • Printer Name: Apple
  • Printer Description: Banana

CUPS Class

  • Class Name: Cat

  • Class Description: Dog

    Note: Under "Printers & Scanners" the printer name that showed up was Dog.
    image

Testing

  1. List All Printers via qz.findPrinters()

    When these fields are all different, the printer name (Apple) and the class name (Cat) both show using "List All Printers"

    image

  2. Detect Printer:

    • Apple: via qz.findPrinter("apple")
      image

      image

    • Banana: via qz.findPrinter("banana")
      image

    • Cat: via qz.findPrinter("cat")
      image

    • Dog: via qz.findPrinter("dog")
      image

      However, when selecting "Use Default Printer" the printer Dog is found via qz.findPrinter()

      image

    Note: It was much easier to see this bug when all four of these fields were different.

Resolution

  • MAC OSX uses the class description as the printer name found in the system (Printers & Scanners)
  • The Detect Printer function does not find the printer name that shows up in Printers & Scanners

All of these weird issues can be avoided by make the Printer Name, Printer Description, and the Class Description the same.

@tresf

This comment has been minimized.

Contributor

tresf commented Jan 12, 2016

the printer description (Banana) and the class name (Cat) both show using "List All Printers"

This mismatches the screenshot you've provided.

All of these weird issues can be avoided by make the Printer Name, Printer Description, and the Class Description the same.

If we're 100% sure of this, we should update our wiki to reflect this, then we can close out this issue... however... AFAIK, the Printer Name has certain hard restrictions (i.e. cannot contain spaces) so this gives the ability for one to be more verbose than the other. We may want to make mention of that as well. Also, please link this bug report so that Mac users are given advanced notice of the bug.

screenshot

I think this image does a lot to explain the problem. Once our documentation is update, we can close this out as wontfix.

@klabarge

This comment has been minimized.

Contributor

klabarge commented Jan 14, 2016

This mismatches the screenshot you've provided.

You are right, I have updated my post.

I updated the wiki documentation under Step 8 for creating the printer and under Step 2 for creating the printer class.

Edit: Also added to Getting Started guide via https://qz.io/wiki/2.0-Getting-Started#find-printer. --@tresf

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.