0

When I try to add printers using lpadmin (after unzipping the correct PPD's enclosing .gz archive) I often receive the error:

"Unable to open PPD file [x] - No such file or directory."

But when I navigate to /Library/Printers/PPDs/Contents/Resources/ and ls, the PPD I was trying to use is right there. So I hit up-cursor a few times to the lpadmin in history, and reissue the command verbatim...and it works.

This is replicable on numerous Macs, both in 10.6 and 10.7. It's as if the ls command "convinces" lpadmin that the PPD actually exists. I can't figure out if this is filesystem lag (buffering), a Terminal problem, or something else.

ktappe
  • 109
  • 5

2 Answers2

1

Are you including the path when you specify the PPD file? I.e. you need to use something like:

lpadmin [...] -P /Library/Printers/PPDs/Contents/Resources/SomePrinter.ppd

If you only specify -P SomePrinter.ppd, it won't work until/unless you cd to the folder the PPD is in...

Gordon Davisson
  • 118,432
  • 16
  • 123
  • 151
  • Thanks guys. I assumed (yeah, yeah) that lpadmin knew to look in /Library/Printers/PPDs/Contents/Resources. Lesson learned! – ktappe Apr 10 '12 at 14:23
0

Using the -P (PPD) flag to lpadmin requires the (either absolute or relative) path to the PPD. IF and ONLY if you are in /Library/Printers/PPDs/Contents/Resources/ the simple name of the PPD suffices.

Alternatively, you can use the -m (model) flag to lpadmin, which doesn't require a path, but the model name of your printer instead.

Kurt Pfeifle
  • 86,724
  • 23
  • 248
  • 345