MacOS – lpr fails to print asking for manual paper feed

cupsmacosprinting

I use macOS High Sierra with a HP LaserJet Pro M12w printer. I can print regularly from macOS applications. However, when I print from lpr, the file remains enqueued with a message asking “Load paper in the manual feed tray”.

Note that the printer has only one tray.

With lpoptions -l I've found:

InputSlot/Media Source: *Manual

Which means the default is Manual, and it is also the only option (there is not an Auto option), so I suppose this is the problem (the other options are reasonable and reflect the current printer settings).

I tried to change that setting from the lpoptions command, but it does not change (probably because there is only one value), while from the UI (for instance from the print dialog of applications) there no possibility of changing the input slot (probably because there is only one option).

I suppose that the problem is generated in the ppd file for the printer, where the are the two lines:

*DefaultInputSlot: Manual
*InputSlot Manual/Manual Feed: "<</MediaPosition 4>>setpagedevice"

I'm not sure if this idea is correct, and I'm afraid of modifying that file.

Any idea on how to solve this problem?

Thanks in advance.

Best Answer

I tried a simple hack that works. Do not know if this is the best clean solution (I have doubts!), however it works for me, at least for now.

I simply removed from the PPD of the printer the following lines:

> *OpenUI *InputSlot/Media Source: PickOne
> *OrderDependency: 10 AnySetup *InputSlot
> *DefaultInputSlot: Manual
> *InputSlot Manual/Manual Feed: "<</MediaPosition 4>>setpagedevice"
> *CloseUI: *InputSlot