Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing Problem
Message
From
15/04/1999 08:24:45
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00208338
Message ID:
00208511
Views:
24
>>>>I call the following code to print to a generic printer on lpt1:
>>>>
>>>>*** Begin
>>>>SET DEVICE TO PRINT
>>>>@01,01 SAY "This is a test print"
>>>>@50,01 SAY "End of the print test"
>>>>EJECT
>>>>SET DEVICE TO SCREEN
>>>>
>>>>
>>>>SET DEVICE TO PRINT
>>>>@01,01 SAY "This is a test print (2)"
>>>>@50,01 SAY "End of the print test (2)"
>>>>EJECT
>>>>SET DEVICE TO SCREEN
>>>>
>>>>
>>>>SET DEVICE TO PRINT
>>>>@01,01 SAY "This is a test print (3)"
>>>>@50,01 SAY "End of the print test (3)"
>>>>EJECT
>>>>SET DEVICE TO SCREEN
>>>>*** End
>>>>
>>>>The problem is that the last page does not get printed. Instead, it sits in the print queue, "spooling" forever and ever. Only when I run the program again will the last page print. But, the last page of the next printjob does not print! In fact, the next printjob gets "attached" to the first printjob. It does not produce a new printjob in the queue.
>>>>
>>>>Any print jobs that come in behind it (say from another person or application) get backed up in the queue waiting for my foxpro job to finish. Only when I exit foxpro (or the .exe) will the print job dump the last page and end the job to let others print.
>>>>
>>>>Is there a special code that I need to issue to tell the printjob that it's done? Or do I need to do something totally different. (Prefer not to since it is old code and we are not converting it to visual yet). The code we are remediating is old QuickSilver code. We are bringing it to VFP5 because the client no longer has quicksilver licenses.
>>>>
>>>>Any ideas?
>>>>
>>>>Thanks for your help!
>>>>
>>>>Jeff
>>>
>>>
>>>Try a SET PRINT TO at the end of your code.
>>
>>Even better is SET PRINT TO NUL, followed by a SET PRINT TO - the change in devices may trigger some spooler software when just a SET PRINT TO did not.
>
>Thanks, Ed. SET PRINT TO has always worked for me, but I'll note this for future reference.

Fred, I've specifically needed that code when printing to network printers attached to a virtual port via the Novell CAPTURE command with some versions of NetWare (I had problems with various versions of the 3.1x implementation's CAPTURE command; I have the code in place and it doesn't seem to hurt under 3.2 or 4.x, so I'm leaving the code alone for the time being...)
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