Option NAME does not work for me on printers connected to non-local computers.

This forum is for eXpress++ general support.
Post Reply
Message
Author
Diego Euri Almanzar
Posts: 155
Joined: Thu Nov 05, 2020 10:51 am
Location: DOMINICAN REPUBLIC

Option NAME does not work for me on printers connected to non-local computers.

#1 Post by Diego Euri Almanzar »

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.

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Option NAME does not work for me on printers connected to non-local computers.

#2 Post by skiman »

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.

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
As result you will have the complete printer name as it is seen in Windows. Now you can use it.
Best regards,

Chris.
www.aboservice.be

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Option NAME does not work for me on printers connected to non-local computers.

#3 Post by Tom »

Code: Select all

if Upper(Trim(cPrinterName)) $ upper(aPrinters[x])
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Diego Euri Almanzar
Posts: 155
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.

#4 Post by Diego Euri Almanzar »

Excellent, wonderful. Thanks a lot, Skiman and Tom.

Post Reply