Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with printer in Windows Terminal Server
Message
From
13/09/2002 07:04:32
 
 
To
13/09/2002 06:29:01
Cleber Ferrari
Capta Tecnologia
Brazil
General information
Forum:
Windows
Category:
Printing
Miscellaneous
Thread ID:
00700080
Message ID:
00700092
Views:
11
>Gentleman,
>
>I´m having a problem with a remote user that use the Terminal Server to connect to my server (windows 2000 server portuguese brazil) and use the sistem ( VFP7 ).
>
>Until last friday, the server had the Service Pack 2 installed and everything worked normally
>
>Last saturday I´ve installed the Service Pack 3 and now I have the following problem: when the user has to print a forma bill of sale (the printer is an Epson FX 2180 using the driver Generic / Text Only. The Driver is in the Windows 98 and also in the Terminal Server) the printer eject the first page. I don´t have any command "eject" in the sistem, the document is sent directly trough the "???".
>
>What can be wrong????

This is just a SWAG, but it's normally the case that the first ??? issued by VFP causes a context shift for the print device, which results in a skip to top of page. If this is the case, you can bypass the Windows GDI layer that connects your app to the spooler by using a few API calls. Download File #9957 and use it to print directly to the Epson bypassing the GDI; instead of ???, use the DocWrite method to print the report as a direct replacment:
* Existing code
SET PRINTER TO LPT1:
??? "Now is the time to replace " + CHR(13) + CHR(10)
??? "VFP's ??? with method calls" + CHR(13) + CHR(12)
* Replace with
SET PROC TO DIRPRTCLASS.PRG ADDITIVE
oDirPrt = CREATEOBJ('DirectPrintOutput')
WITH oDirPrt
   .PrinterOpen('LPT1:')
   IF .PrinterIsOpen()
      .DocOpen('MySpoolJob')
      .DocWrite("Now is the time to replace " + CHR(13) + CHR(10))
      .DocWrite("VFP's ??? with method calls" + CHR(13) + CHR(12))
      .DocClose()
   ENDIF
   .PrinterClose()
ENDWITH
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform