How to programmatically get list of trays of a Google Cloud Print enabled printer in Python in a manufacturer independant way?

H

Harish Nair

Guest
I am building a software where there is a requirement to submit a print to a Google Cloud Enabled printer to a particular tray.

Right now the approach I have taken is to use a Google service account and the submit the print to the printer using printer_id. I used a library called 'ezprinting' for the same.

I am able to submit print using printer id using the approach above. There is also a function in 'ezprinting' to get printer attributes that shows the details of printer including trays. But the problem is that the attributes are shown in different format for different printers.The structure is somewhat different and also the key corresponding to the tray list is different for different printers.

I was wondering if there is a way to list the trays of a printer in a printer/manufacture independant way?

Continue reading...
 
Top