Solved set printer for gvim hardcopy

freebsd-version -kur
14.1-RELEASE-p5
14.1-RELEASE-p5
14.1-RELEASE-p6

vim-gtk3-9.1.0764

I have a network printer (np4175) to which I wish to direct hardcopy output from gvim. The printer is setup in cups and test pages print therefrom. The printer shows up in lpstat -p:
Code:
lpstat -p | grep -i np4175
printer NP4175.HAMILTON.HARTE-LYNE.CA is idle.  enabled since Fri Nov 29 08:45:28 2024
.

If in gvim I issue
Code:
:set printdevice=NP4175.HAMILTON.HARTE-LYNE.CA
:1,25hardcopy
then I get this error:
Code:
E365: Failed to print PostScript file
If I do not alter the printdevice then hardcopy goes to the default system printer.

Q. How do I redirect hardcopy output to np4175?

A. Oddly enough, the answer is in the question: set printdevice=np4175
An entry in /etc/printcap gives the printer name as the first field.
Code:
np4175|Lexmark MS711dn 2nd Floor:sd=/var/spool/lpd/np4175:lf=/var/log/lpd-errs:rm=np4175.hamilton.harte-lyne.ca:rp=printers/np4175.hamilton.harte-lyne.ca:sh:
The problem, for me, is that this important piece of information does not appear to be reported in any of the common lp utilites; at least as far as I could discover.
 
Back
Top