public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Printing (lpr, print, cat > <various names> returns printer not valid or no longer available
@ 2018-02-22 14:32 rodney.barnhart
  2018-02-22 22:50 ` Andrey Repin
  0 siblings, 1 reply; 6+ messages in thread
From: rodney.barnhart @ 2018-02-22 14:32 UTC (permalink / raw)
  To: cygwin

I have read the FAQs and 100's on general web page discussions re printing
and they all talk about \\ <file://%3cserver%3e/%3cprinter>
<server>\<printer> as the answer, but I only get the not valid response.
I've tried many varients of \\, //, "", ''  and escaping 2, 4 etc times  and
it doesn't make any difference.

 

I am running Windows 10 and can print to the printers in the device list in
Windows without problems from Windows. The printer in question is Postscript
capable HP print on the local network with no particular "server" that I am
aware of. 

I even tried making a shorter printer name with no spaces or special
characters, The OS sent that name when I started Cygwin, but it again didn't
make any difference.

Here is some information, any help would be greatly appreciated.

 

I find it hard to believe I'm the only one having this problem.

 

By the way I installed "everything" when I installed Cygwin, took almost 5
hours - I'm very patient, but everything worked fine and it used about 150+G
of disk space, no problem.

 

Here is some information, any help would be greatly appreciated.

$ lpr -D

Windows printer name = 'NPIFA1F16 (HP Color LaserJet CP2025n)'

isWindows9x = 0, isWindows2K_NT4 = 1

Printer name: 'NPIFA1F16 (HP Color LaserJet CP2025n)', Port name:
'WSD-4c342c10-53d8-4569-8ddf-131b36eb360b.0063'

Printer name: 'Microsoft XPS Document Writer', Port name: 'PORTPROMPT:'

Printer name: 'Microsoft Print to PDF', Port name: 'PORTPROMPT:'

Printer name: 'HP ePrint + JetAdvantage', Port name: 'HP ePrint'

Printer name: 'Fax', Port name: 'SHRFAX:'

 

rodne@Rodney-HP-Envy ~

$ lpr -d \\192.168.0.122\$PRINTER .bashrc

lpr: printer error: can't open '\192.168.0.122$PRINTER' for writing: The
printer name is invalid.

 

rodne@Rodney-HP-Envy ~

$ lpr -d '\\192.168.0.122\NPIFA1F16 (HP Color LaserJet CP2025n)' .bashrc

lpr: printer error: can't open '\\192.168.0.122\NPIFA1F16 (HP Color LaserJet
CP2025n)' for writing: The printer name is invalid.

 

Can't initialize "prn", print doesn't work either, copying directly to the
printer doesn't work, cating and pipling to lpr doesn't work

 

Rod (2/22/18)

 


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Printing (lpr, print, cat > <various names> returns printer not valid or no longer available
  2018-02-22 14:32 Printing (lpr, print, cat > <various names> returns printer not valid or no longer available rodney.barnhart
@ 2018-02-22 22:50 ` Andrey Repin
  2018-02-23  2:22   ` Rodney Barnhart
  0 siblings, 1 reply; 6+ messages in thread
From: Andrey Repin @ 2018-02-22 22:50 UTC (permalink / raw)
  To: rodney.barnhart, cygwin

Greetings, rodney.barnhart@verizon.net!

> I have read the FAQs and 100's on general web page discussions re printing
> and they all talk about \\ <file://%3cserver%3e/%3cprinter>
> <server>\<printer> as the answer, but I only get the not valid response.
> I've tried many varients of \\, //, "", ''  and escaping 2, 4 etc times  and
> it doesn't make any difference.

I have only one question: are you using Cygwin's or Windows `lpr' ?

>  

> I am running Windows 10 and can print to the printers in the device list in
> Windows without problems from Windows. The printer in question is Postscript
> capable HP print on the local network with no particular "server" that I am
> aware of. 

> I even tried making a shorter printer name with no spaces or special
> characters, The OS sent that name when I started Cygwin, but it again didn't
> make any difference.

> Here is some information, any help would be greatly appreciated.

>  

> I find it hard to believe I'm the only one having this problem.

>  

> By the way I installed "everything" when I installed Cygwin, took almost 5
> hours - I'm very patient, but everything worked fine and it used about 150+G
> of disk space, no problem.

>  

> Here is some information, any help would be greatly appreciated.

> $ lpr -D

> Windows printer name = 'NPIFA1F16 (HP Color LaserJet CP2025n)'

> isWindows9x = 0, isWindows2K_NT4 = 1

> Printer name: 'NPIFA1F16 (HP Color LaserJet CP2025n)', Port name:
> 'WSD-4c342c10-53d8-4569-8ddf-131b36eb360b.0063'

> Printer name: 'Microsoft XPS Document Writer', Port name: 'PORTPROMPT:'

> Printer name: 'Microsoft Print to PDF', Port name: 'PORTPROMPT:'

> Printer name: 'HP ePrint + JetAdvantage', Port name: 'HP ePrint'

> Printer name: 'Fax', Port name: 'SHRFAX:'

>  

> rodne@Rodney-HP-Envy ~

> $ lpr -d \\192.168.0.122\$PRINTER .bashrc

> lpr: printer error: can't open '\192.168.0.122$PRINTER' for writing: The
> printer name is invalid.

>  

> rodne@Rodney-HP-Envy ~

> $ lpr -d '\\192.168.0.122\NPIFA1F16 (HP Color LaserJet CP2025n)' .bashrc

> lpr: printer error: can't open '\\192.168.0.122\NPIFA1F16 (HP Color LaserJet
> CP2025n)' for writing: The printer name is invalid.

>  

> Can't initialize "prn", print doesn't work either, copying directly to the
> printer doesn't work, cating and pipling to lpr doesn't work

>  

> Rod (2/22/18)

>  


> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



-- 
With best regards,
Andrey Repin
Friday, February 23, 2018 01:44:54

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Printing (lpr, print, cat > <various names> returns printer not valid or no longer available
  2018-02-22 22:50 ` Andrey Repin
@ 2018-02-23  2:22   ` Rodney Barnhart
  2018-02-23 15:50     ` Andrey Repin
       [not found]     ` <000001d3ace2$0cab84f0$26028ed0$@verizon.net>
  0 siblings, 2 replies; 6+ messages in thread
From: Rodney Barnhart @ 2018-02-23  2:22 UTC (permalink / raw)
  To: cygwin

Andrey,
Thanks for responding.
I have to apologize in advance. I don't know the answer to your question.

It's the lpr that executes under the bash system once CYGwin starts. I did a
search for lpr.exe under windows and found one under an obscure windows
directory. When I tried to execute it said it can't run on my PC? Windows
doesn't seem to have a native lpr?
I don't know how to find the Cygwin lpr that I'm using. I remind you that
print, catting to $PRINTER don't work either.
If you tell me how I'll find which lpr is running under bash in Cygwin.

Thanks

Rod

-----Original Message-----
From: Andrey Repin [mailto:anrdaemon@yandex.ru] 
Sent: Thursday, February 22, 2018 5:47 PM
To: rodney.barnhart@verizon.net; cygwin@cygwin.com
Subject: Re: Printing (lpr, print, cat > <various names> returns printer not
valid or no longer available

Greetings, rodney.barnhart@verizon.net!

> I have read the FAQs and 100's on general web page discussions re 
> printing and they all talk about \\ <file://%3cserver%3e/%3cprinter> 
> <server>\<printer> as the answer, but I only get the not valid response.
> I've tried many varients of \\, //, "", ''  and escaping 2, 4 etc 
> times  and it doesn't make any difference.

I have only one question: are you using Cygwin's or Windows `lpr' ?

>  

> I am running Windows 10 and can print to the printers in the device 
> list in Windows without problems from Windows. The printer in question 
> is Postscript capable HP print on the local network with no particular 
> "server" that I am aware of.

> I even tried making a shorter printer name with no spaces or special 
> characters, The OS sent that name when I started Cygwin, but it again 
> didn't make any difference.

> Here is some information, any help would be greatly appreciated.

>  

> I find it hard to believe I'm the only one having this problem.

>  

> By the way I installed "everything" when I installed Cygwin, took 
> almost 5 hours - I'm very patient, but everything worked fine and it 
> used about 150+G of disk space, no problem.

>  

> Here is some information, any help would be greatly appreciated.

> $ lpr -D

> Windows printer name = 'NPIFA1F16 (HP Color LaserJet CP2025n)'

> isWindows9x = 0, isWindows2K_NT4 = 1

> Printer name: 'NPIFA1F16 (HP Color LaserJet CP2025n)', Port name:
> 'WSD-4c342c10-53d8-4569-8ddf-131b36eb360b.0063'

> Printer name: 'Microsoft XPS Document Writer', Port name: 'PORTPROMPT:'

> Printer name: 'Microsoft Print to PDF', Port name: 'PORTPROMPT:'

> Printer name: 'HP ePrint + JetAdvantage', Port name: 'HP ePrint'

> Printer name: 'Fax', Port name: 'SHRFAX:'

>  

> rodne@Rodney-HP-Envy ~

> $ lpr -d \\192.168.0.122\$PRINTER .bashrc

> lpr: printer error: can't open '\192.168.0.122$PRINTER' for writing: 
> The printer name is invalid.

>  

> rodne@Rodney-HP-Envy ~

> $ lpr -d '\\192.168.0.122\NPIFA1F16 (HP Color LaserJet CP2025n)' 
> .bashrc

> lpr: printer error: can't open '\\192.168.0.122\NPIFA1F16 (HP Color 
> LaserJet CP2025n)' for writing: The printer name is invalid.

>  

> Can't initialize "prn", print doesn't work either, copying directly to 
> the printer doesn't work, cating and pipling to lpr doesn't work

>  

> Rod (2/22/18)

>  


> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



--
With best regards,
Andrey Repin
Friday, February 23, 2018 01:44:54

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Printing (lpr, print, cat > <various names> returns printer not valid or no longer available
  2018-02-23  2:22   ` Rodney Barnhart
@ 2018-02-23 15:50     ` Andrey Repin
  2018-02-23 16:10       ` Marco Atzeri
       [not found]     ` <000001d3ace2$0cab84f0$26028ed0$@verizon.net>
  1 sibling, 1 reply; 6+ messages in thread
From: Andrey Repin @ 2018-02-23 15:50 UTC (permalink / raw)
  To: Rodney Barnhart, cygwin

Greetings, Rodney Barnhart!

Please no top-posting in this list.
See https://cygwin.com/acronyms/#TOFU , also https://cygwin.com/acronyms/#PCYMTNQREAIYR

> Andrey,
> Thanks for responding.
> I have to apologize in advance. I don't know the answer to your question.

You can find it by using the usual means.

$ which <program>

will tell you, what is the actual path it is using currently.

> It's the lpr that executes under the bash system once CYGwin starts. I did a
> search for lpr.exe under windows and found one under an obscure windows
> directory. When I tried to execute it said it can't run on my PC? Windows
> doesn't seem to have a native lpr?

It should, if printer monitor service is installed.
Does not mean it will be an equal substitution.

> I don't know how to find the Cygwin lpr that I'm using. I remind you that
> print, catting to $PRINTER don't work either.
> If you tell me how I'll find which lpr is running under bash in Cygwin.

Did you "find" it in WinSxS cache?

P.S.
It was a long time since I last tried smth like this, but I can replicte your
issues. Even if the job was sent to printer, it results in error.
On another hand, running text files trough

convert text:... pdf:- | lpr -lP '//$HOSTNAME/Device'

did produce some usable results. With PDFCreator.
It appears, the data sent to the printer must be understood by the printer
itself.


-- 
With best regards,
Andrey Repin
Friday, February 23, 2018 16:06:08

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Printing (lpr, print, cat > <various names> returns printer not valid or no longer available
  2018-02-23 15:50     ` Andrey Repin
@ 2018-02-23 16:10       ` Marco Atzeri
  0 siblings, 0 replies; 6+ messages in thread
From: Marco Atzeri @ 2018-02-23 16:10 UTC (permalink / raw)
  To: cygwin

On 23/02/2018 16:35, Andrey Repin wrote:
> Greetings, Rodney Barnhart!
> 

> 
> P.S.
> It was a long time since I last tried smth like this, but I can replicte your
> issues. Even if the job was sent to printer, it results in error.
> On another hand, running text files trough
> 
> convert text:... pdf:- | lpr -lP '//$HOSTNAME/Device'
> 
> did produce some usable results. With PDFCreator.
> It appears, the data sent to the printer must be understood by the printer
> itself.
> 

of course, it is also reported on the manual:


DESCRIPTION
        lpr  spools  a  file  to the specified printer device. No 
formatting is  done -- data is sent "raw". This is useful,
for  example,  for  sending Postscript data to a Postscript printer.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Printing (lpr, print, cat > <various names> returns printer not valid or no longer available
       [not found]     ` <000001d3ace2$0cab84f0$26028ed0$@verizon.net>
@ 2018-02-25 14:28       ` rodney.barnhart
  0 siblings, 0 replies; 6+ messages in thread
From: rodney.barnhart @ 2018-02-25 14:28 UTC (permalink / raw)
  To: cygwin

From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of
Rodney Barnhart
Sent: Thursday, February 22, 2018 9:22 PM
To: cygwin@cygwin.com
Subject: RE: Printing (lpr, print, cat > <various names> returns printer not
valid or no longer available

Andrey,
2/23/2018 update
Did you "find" it in WinSxS cache?
Yes but that's the one that won't execute on Windows 10.
It's the same on the machine with Cygwin installed and another windows 10
machine without Cygwin installed, and responds the same way from Windows -
can't run on PC.

On the Cygwin terminal:
rodne@Rodney-HP-Envy ~
$ which lpr
/usr/bin/lpr

rodne@Rodney-HP-Envy ~
$ cygcheck lpr
Found: C:\cygwin64\bin\lpr.exe
Found: C:\cygwin64\bin\lpr.exe
C:\cygwin64\bin\lpr.exe
  C:\cygwin64\bin\cygwin1.dll
    C:\windows\system32\KERNEL32.dll
      C:\windows\system32\ntdll.dll
      C:\windows\system32\KERNELBASE.dll
  C:\cygwin64\bin\cyggcc_s-seh-1.dll
  C:\cygwin64\bin\cygstdc++-6.dll
  C:\windows\system32\WINSPOOL.DRV
    C:\windows\system32\msvcrt.dll
    C:\windows\system32\IPHLPAPI.DLL
    C:\windows\system32\bcrypt.dll

rodne@Rodney-HP-Envy ~
$ uname -a
CYGWIN_NT-10.0 Rodney-HP-Envy 2.10.0(0.325/5/3) 2018-02-02 15:16 x86_64
Cygwin

rodne@Rodney-HP-Envy ~
$ bash -version
GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin) Copyright (C)
2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.lpr

rodne@Rodney-HP-Envy /usr/bin
$ lpr -lP '//192.168.0.122/NPIA1F16 (HP Color LaserJet CP2025n)' .bashrc
lpr: printer error: can't open '\\192.168.0.122\NPIA1F16 (HP Color LaserJet
CP2025n)' for writing: The specified network name is no longer available.

If I use wordpad on the windows side and open the .bashrc file I can print
it fine on the network printer.

Thanks for your help

Rod


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-25 14:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-22 14:32 Printing (lpr, print, cat > <various names> returns printer not valid or no longer available rodney.barnhart
2018-02-22 22:50 ` Andrey Repin
2018-02-23  2:22   ` Rodney Barnhart
2018-02-23 15:50     ` Andrey Repin
2018-02-23 16:10       ` Marco Atzeri
     [not found]     ` <000001d3ace2$0cab84f0$26028ed0$@verizon.net>
2018-02-25 14:28       ` rodney.barnhart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).