Remote Desktop Label Printing

Ianvn

Well-Known Member
Joined
Jan 15, 2008
Messages
229
Reaction score
19
Location
Pretoria
I have written an app for a client in VB.Net that prints prices etc to specific labels using a Zebra label printer.

All the "coordinates" and data for each item that has to be printed is written in a file and then that file gets printed by using the command line "print c:\sample_file.extension" command.

This works perfectly from within their office. Their is one user that remote desktops into the office. This does not work for this user as the print command send the data to the LPT1 port of the host machine (in this case the server).

Is there any way to get the same functionality for the remote user?
 
Before we can assist, we need more info:

Where is this application hosted?
Is it on the same machine is the printer?
Under which account is this application running?
Is it perhaps running as a Windows Servce?
How is the remote user logging in?
How does a local user log in?
Via remote desktop or through a VPN connection?

Sounds to me like the environment (user account, context, printer settings, other settings etc) is different for the local user and the remote user, hence you are getting different behaviour.
 
In the office the application is installed on a windows machine that has the printer installed on it.

The remote user logs into the server using remote desktop - the application is installed on the server but she want to print to her printer that is installed on her local machine at home. So even though she is using the application remotely - she should print locally.
 
In the office the application is installed on a windows machine that has the printer installed on it.

The remote user logs into the server using remote desktop - the application is installed on the server but she want to print to her printer that is installed on her local machine at home. So even though she is using the application remotely - she should print locally.

Well then you need to provide the option for her to select which printer she wants to print to. You will need to write some code for this - ask Windows for a list of available printers, display them to the user and allow the user to choose the appropriate printer.

...that file gets printed by using the command line "print c:\sample_file.extension" command.

The above is not good enough. You need to check if this command can allow you to specify which printer to print to. It is probably just printing to the PCs default printer, since no other parameters have been specified.

You could either use the .Net library to do the printing, or execute a command line instruction to do the printing (as you've done above). My guess is that using the .Net library to do the printing will be more flexible, user-friendly, easier to debug, provide more useful error messages to the user, and will be more feature-rich. Investigate both options, but I would recommend using the .Net Library to do your printing. All the code you require should be sitting in the System.Printing namespace.
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X