Long Printer Names.
-
- Posts: 388
- Joined: Sun Nov 06, 2005 3:55 pm
- Location: Southern California, USA
- Contact:
Long Printer Names.
I have come across a problem that seems to exist in my fivewin apps. Sometimes when I specifically call out a printer by name:
Print oPrn cPrinterName
Sometimes this works fine, and other times the system displays a printer selection dialog as if the printer I asked for is not available on this workstation. I find this happens more often with using RDP with printer redirection. What I have found is that RDP appends additional characters to the print name. Example:
HP OfficeJet 9999 Mopier
This would be the name on the host RDP workstation.
HP OfficeJet 9999 Mopier (Redirected2)
This would be the name on the remote RDP workstation, RDP added the "(Redirected2)" to the printer name.
I believe it is the length of the printer name that causes the problem. I read somewhere that it is limited to 32 characters. However it is ok to create a printer with a name over 32 characters. Anybody had this same issue, and is there a way around it?
Thanks,
Byron ...
Print oPrn cPrinterName
Sometimes this works fine, and other times the system displays a printer selection dialog as if the printer I asked for is not available on this workstation. I find this happens more often with using RDP with printer redirection. What I have found is that RDP appends additional characters to the print name. Example:
HP OfficeJet 9999 Mopier
This would be the name on the host RDP workstation.
HP OfficeJet 9999 Mopier (Redirected2)
This would be the name on the remote RDP workstation, RDP added the "(Redirected2)" to the printer name.
I believe it is the length of the printer name that causes the problem. I read somewhere that it is limited to 32 characters. However it is ok to create a printer with a name over 32 characters. Anybody had this same issue, and is there a way around it?
Thanks,
Byron ...
Thanks,
Byron Hopp
Matrix Computer Services
Byron Hopp
Matrix Computer Services
- Otto
- Posts: 6403
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 22 times
- Been thanked: 2 times
- Contact:
Re: Long Printer Names.
Hello,
on printer redirection I use GetDefaultPrinter() - same on Bluetooth.
Best regards,
Otto
on printer redirection I use GetDefaultPrinter() - same on Bluetooth.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
-
- Posts: 388
- Joined: Sun Nov 06, 2005 3:55 pm
- Location: Southern California, USA
- Contact:
Re: Long Printer Names.
Thanks for you response but I am not wanting the "Default Printer" I need the printer name that I have saved in the INI file. In my case the default printer is PDF995. The problem seems to be that the printer name I save in the ini will not be found when I call the "Print oPrn cPrintername" command, because the system does not find the printer based on the name I previously saved. I seems to be truncated so the strings are not exactly the same.
Byron ...
Byron ...
Thanks,
Byron Hopp
Matrix Computer Services
Byron Hopp
Matrix Computer Services
Re: Long Printer Names.
The Print command is really messed up in recent versions of FWH. In fact, in the command print oprn cprinter, as you described, cprinter is ignored completely. The only way to get that to work is to first set the windows default printer to the printer you want. This makes you think its working but its really not. I always set it back to what it was when I am done but this creates a whole set of other problems. For example, printer tray selections are not retained, etc.
-
- Posts: 388
- Joined: Sun Nov 06, 2005 3:55 pm
- Location: Southern California, USA
- Contact:
Re: Long Printer Names.
Thank you dtussmen, and My apologies Otto, looks like this is what you were trying to tell me.
I'll play around with this and see.
Byron ...
I'll play around with this and see.
Byron ...
Thanks,
Byron Hopp
Matrix Computer Services
Byron Hopp
Matrix Computer Services
- armando.lagunas
- Posts: 346
- Joined: Mon Oct 05, 2009 3:35 pm
- Location: Curico-Chile
- Contact:
Re: Long Printer Names.
hello!
this post in spanish forum
http://forums.fivetechsupport.com/viewtopic.php?f=6&t=32501&hilit=query+session
this post in spanish forum
http://forums.fivetechsupport.com/viewtopic.php?f=6&t=32501&hilit=query+session
SkyPe: armando.lagunas@hotmail.com
Mail: armando.lagunas@gmail.com
Mail: armando.lagunas@gmail.com
- Enrico Maria Giordano
- Posts: 8753
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Re: Long Printer Names.
byron.hopp wrote:Print oPrn cPrinterName
The correct syntax is
Code: Select all | Expand
Print oPrn TO cPrinterName
EMG
Re: Long Printer Names.
sorry, I was using the TO statement and regardless it still doesn't work. The only way you can get it to print to a specific printer is to change the windows default printer to the printer you want. Also, if you select a printer using the FROM USER statement the selection is not remembered, and the next time you go to print something using FROM USER it defaults back to the windows default printer. This all worked fine back in old versions of FWH.
-
- Posts: 388
- Joined: Sun Nov 06, 2005 3:55 pm
- Location: Southern California, USA
- Contact:
Re: Long Printer Names.
Yes
Print oPrn Name cTitle to cWinPrinter
My internal manual has failed me. Happens more and more as I age...
I have it correct in my code.
Print oPrn Name cTitle to cWinPrinter
My internal manual has failed me. Happens more and more as I age...
I have it correct in my code.
Thanks,
Byron Hopp
Matrix Computer Services
Byron Hopp
Matrix Computer Services
- Enrico Maria Giordano
- Posts: 8753
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Re: Long Printer Names.
dtussman wrote:sorry, I was using the TO statement and regardless it still doesn't work. The only way you can get it to print to a specific printer is to change the windows default printer to the printer you want. Also, if you select a printer using the FROM USER statement the selection is not remembered, and the next time you go to print something using FROM USER it defaults back to the windows default printer. This all worked fine back in old versions of FWH.
Can you build a reduced and self-contained sample showing the problem, please?
EMG
Re: Long Printer Names.
I finally identified the source of all my aggravation. In newer versions of FWH the ENDPRINT command sets the application printer back to the Windows default printer. In the old days this did not happen. It is possible to dispense with ENDPRINT and just use oprn:end(), but ENDPRINT seems to be necessary if doing a PREVIEW as otherwise the preview screen does not come up. I solved this by writing my own function that sets the printer back to the application printer after doing an ENDPRINT, but one shouldn't have to do this.