|
|||||||
| TX Text Control ActiveX Please use this forum for TX Text Control ActiveX support only. If you need support for a different product, please use the appropriate forum. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
TextControl version: ActiveX v14 SP3
Used in: PowerBuilder 11 Operating Systems: 64-bit Windows 7, 32-bit Windows Server 2008 I have this strange problem when printing from a remote desktop session. First of all, printers (and drivers) are correctly installed. When I log on to the computer locally I have two printers, a Xerox WorkCentre PRO C3545, a network printer, and CutePDF printer, it prints to a PDF document. I do not have any problems printing to these printers from any other applications. When I log on to the same computer using same username via Remote Desktop, the two of them still works fine in other applications. In addition I also have a Xerox WorkCentre PRO C3545(redirected) printer in the session, that's the same physical printer installed locally on the remote computer I am connecting from. That works fine too. That said, our application needs to print a TextControl document. We use the WIN32 API to display a Print Dialog (PrintDlg) and fetch selected printer and other user options. Printer is set with TextControl.PrintDevice property and print is triggered with TextControl.PrintDoc(...). When I do this locally everything works fine, our TextControl powered applications can print all documents to said printers without problems. The error occurs when I log on to the same computer via remote desktop. When trying to print a document I get an error. These messages are fetched from the exception message: Result Code: 65535 Exception Code: 65535 Source: Component provided no error information messate Description: Component died; exception caught by PowerBuilder Here is the code I use for printing: Code:
lnv_printing = CREATE n_cst_printing
lnv_printerArgs.ToPage = myTextControl.CurrentPages
lnv_printerArgs.MaxPage = myTextControl.CurrentPages
IF (lnv_printing.pof_printdlg(ref lnv_printerArgs) = 1) THEN
//Set print device
//This goes fine:
myTextControl.PrintDevice = lnv_printerArgs.hDeviceContext
//Print document
//This is where TextControl component dies:
myTextControl.PrintDoc( &
inv_DocAttrib.istr_fields.Title, &
lnv_printerArgs.FromPage, &
lnv_printerArgs.ToPage, &
lnv_printerArgs.Copies)
END IF
Please help
|
|
#2
|
||||
|
||||
|
Re: Error when printing in Remote Desktop
Hello there,
I fully understand the trouble you are in, but PowerBuilder is officially not supported by TX Text Control, so I am unable to reproduce the issue, sorry. Anyway, TX Text Control requires a locally connected printer to be able to render text in the device's contect and uses Windows' API to access the printer/printer driver. I am not sure how Remote Desktop simulates the printers in that context.
__________________
Regards, Gunnar Giffey, TX Text Control [Forum Administrator] |
|
#3
|
||||
|
||||
|
Re: Error when printing in Remote Desktop
I am no expert on power builder, but I am not sure it has elevated privileges to get the printer base.
Have you ensured that the permissions on the printer allow all authenticated users all permissions ? Remember you are seen as a Remote Instance User not a local user in the newer RDC versions. Regards Adam |
|
#4
|
|||
|
|||
|
Re: Error when printing in Remote Desktop
Quote:
|
|
#5
|
|||
|
|||
|
Re: Error when printing in Remote Desktop
Quote:
|
|
#6
|
|||
|
|||
|
Re: Error when printing in Remote Desktop
Quote:
Last edited by oskaremil; February 1, 2010 at 14:59:14. Reason: Problem still not solved. |
|
#7
|
||||
|
||||
|
Re: Error when printing in Remote Desktop [SOLVED]
Is that secondary TextControl visible and on a form?
If not, that is probably the source of the error.
__________________
Regards, Gunnar Giffey, TX Text Control [Forum Administrator] |
|
#8
|
|||
|
|||
|
Re: Error when printing in Remote Desktop [SOLVED]
Quote:
The primary TextControl, which I am now having troubles with is visible and on a form. |
|
#9
|
|||
|
|||
|
Re: Error when printing in Remote Desktop
Please see attached files (printertest.zip). This is a VB6 form where I reproduced the same error.
When the application is run by a user logged on locally print is OK. When the application is run by a user logged on via Remote Desktop it fails with the attached error message (printertest.png) |
|
#10
|
||||
|
||||
|
Re: Error when printing in Remote Desktop
Hello Oskar,
The issue here is not a bug in TX Text Control, but a general error message from the system. Remote Desktop printing has not been tested with TX Text Control, and I guess that the error comes from the emulated printer driver. TX Text Control requires a valid printer driver to be able to render text in the device context. This seems not to be the case here.
__________________
Regards, Gunnar Giffey, TX Text Control [Forum Administrator] |
|
#11
|
|||
|
|||
|
I have a valid printer driver. Even three of them !
Every other application can print to any of the three printers in Remote Desktop. The application using TextControl also utilizes Crystal Reports print routines and native print routines for other print jobs. So out of a hundred possible places I can print from there is one thing that fails: Printing from a TextControl component. |
|
#12
|
|||
|
|||
|
You even stated that TextControl printing in Remote Desktop isn't tested ? How can you guess that this is a system error when everything else works fine ?
|
|
#13
|
||||
|
||||
|
Re: Error when printing in Remote Desktop
Oskar,
Could you please find out how long the printer's name is, that you want to print on? Thank you.
__________________
Regards, Gunnar Giffey, TX Text Control [Forum Administrator] |
|
#14
|
|||
|
|||
|
Re: Error when printing in Remote Desktop
These are the printer device names. Neither works when printing in remote desktop.
\\http://10.0.8.20\WCP3545 CutePDF Writer Microsoft XPS Document Writer |
|
#15
|
||||
|
||||
|
Re: Error when printing in Remote Desktop
Thank you for your reply.
Could you please test that also with the latest service pack for version 14? Do you get the same result?
__________________
Regards, Gunnar Giffey, TX Text Control [Forum Administrator] |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Printing control - duplex, paper source, number of copies, etc. | jbrown | TX Text Control ActiveX | 0 | May 5, 2009 06:21:49 |
| Problem with Printing | Unregistered | TX Text Control .NET | 2 | September 15, 2004 22:21:30 |
| Printing Images to Metafile | jms3 | TX Text Control ActiveX | 0 | January 6, 2004 16:36:26 |
| Printing to trays | paco36 | TX Text Control ActiveX | 0 | February 25, 2003 15:59:37 |
| header lines missing by printing | Unregistered | TX Text Control ActiveX | 3 | October 15, 2002 21:01:04 |