Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Printing Remotely

I am having trouble understanding how the Set_Printer function works when using the application via RDP (Terminal Services). In the application, I am using Get_Printer function with the DEVICES message to get an array of the printer devices available. The program finds the printer needed for the particular print job, then puts the string of the printer in as the 6th parameter of the Set_Printer function with the INIT message. This process works fine locally, but when running the application through Remote Desktop the result is a the application ALWAYS printing to the default printer. The only difference I see in the string that defines the printer is in the description with text in parenthesis pointing out how the printer is redirected i.e. "Zebra LP2844 (redirected 2)"

I have done a lot of troubleshooting to make sure that I do not have a network issue. I am able to print to the printer via other applications. When I set the printer to be the default printer, the application has no trouble printing as expected. I have even been able to set the parameters to have the OIPI preview screen show me the print job that it is sending to the default printer, and change the printer to the desired printer there to print it. The only problem I have with that is that the proportions get all messed up when I change it to my label printer because of the page size difference.

Is there a different/better way to get and call the printer desired for print jobs when using the application remotely other than Get_Printer and Set_Printer?

Any help is greatly appreciated!

Comments

  • Dan,

    Set_Printer is the only way to tell the OIPI what printer to use. We haven't used the DEVICES message for a long time since we prefer to rely on the Windows API for retrieving available printers. This method has worked for us as a means of getting the proper printer strings and passing these into the INIT message (even for RDP connections.)

    The necessary API functions are used by the PrintSetup routine (in SYSPROG), which serves as a commuter module for the PrintSetup form. We used the logic in this routine to create various printer selection utilities within our applications.
  • How do you see the logic used in the PrintSetup routine? I can only find the form in SYSPROG, but not the routine in the system editor.
  • Dan,

    Hmmm...so you don't see the source in SYSPROG? It's always been available for as long as I can recall, but perhaps Revelation removed this from newer installs. Check your email.
Sign In or Register to comment.