When I use the NAME option, it works correctly if the invoked printer is connected to the computer. But, it does not work for me, when the printer is on another computer, even though it is shared on the network. That is, it works for me on a local printer. It doesn't work for me on a shared printer.
I need help please.
DCPRINT OPTIONS [NAME <cPrinterName>]
Best regards.
Option NAME does not work for me on printers connected to non-local computers.
-
- Posts: 176
- Joined: Thu Nov 05, 2020 10:51 am
- Location: DOMINICAN REPUBLIC
Re: Option NAME does not work for me on printers connected to non-local computers.
Hi,
This is because the name of the printer is different in that case. Just get a list of the printers, search for the printer you need, and use the complete name.
As result you will have the complete printer name as it is seen in Windows. Now you can use it.
This is because the name of the printer is different in that case. Just get a list of the printers, search for the printer you need, and use the complete name.
Code: Select all
cPrinterName := "xxx" -> name of the printer you want to print on.
o := xbpprinter():new()
aPrinters := o:list()
for x = 1 to len(aPrinters)
if cPrinterName $ upper(aPrinters[x])
cPrinterName := aPrinters[x]
endif
next
Re: Option NAME does not work for me on printers connected to non-local computers.
Code: Select all
if Upper(Trim(cPrinterName)) $ upper(aPrinters[x])
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
-
- Posts: 176
- Joined: Thu Nov 05, 2020 10:51 am
- Location: DOMINICAN REPUBLIC
Re: Option NAME does not work for me on printers connected to non-local computers.
Excellent, wonderful. Thanks a lot, Skiman and Tom.