Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing raw data to NT print queue?
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00260321
Message ID:
00260924
Views:
21
mbhRunCmd = "F:\CADD\PLOT\" + Queue + "\" + PlotFiles(Dummy,1)
THISFORM.Printdev1.cfilename = mbhRunCmd
If THISFORM.Printdev1.oOpen()
WAIT WINDOW "PrintDev1 is Open" TIMEOUT 10
if !THISFORM.Printdev1.oPrintFile()
wait window 'Print error' nowait
else
WAIT WINDOW "Cleaning file " + mbhRunCmd TIMEOUT 50
* Here's where I get permission problems if we go too fast:
Erase &mbhRunCmd

endif
THISFORM.Printdev1.oClose()
ELSE
WAIT WINDOW "Error number: " + STR(THISFORM.PrintDev1.nerror)
Endif



If I do the above without the timeouts, it give me a file permission problem on occasion. If I increase the timeouts, it happens less frequently. The machine this runs on is doing other tasks that can occasionally take up lots of cycles. Any ideas?

>I have tested this class sending several files (15) to the print queue, in a loop, without any problem.
>
>Could you be more specific about the problem; provide sample code?.
>
>>Very cool, Ramon. Seems I'm needing to put in a delay between oOpen() and oPrintFile() for it to work, tho. I'm looping through several files in a directory - is there a cleaner way?
>>
>>TIA
>>
>>>>How can I send a raw print file to an NT queue programmatically? Ideally, I'd like to also delete the file after getting it into the queue.
>>>>
>>>>TIA
>>>
>>>Look at RawPrintVCX in the files section (Classes - VCX).
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform