Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing a PDF file to a Printer which is not the defaul
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00644928
Message ID:
00649071
Views:
9
I am not completely positive but I believe there is a way to check to see if the printer you sent the jobs to is still active. If it is, don't reset the default until the printer shows that it is inactive. Like I said I am not positive on this, but I think I read this somewhere before. It might be worth checking out.



>I got to thinking about what was going on here with your problem. (I Love Pdf's and everything pdf)
>What it appears to me is shellexecute spawns a new thread in the os, and by the time
>you are printing the third document the default printer has already been set back to the first
>pritner.
>One sort of simple solution would be to estimate the time it takes to print out these three
>docs and create a timer or wait state (allowing them to print) before you put back your
>printer...
>Its not the best solution, as what are you going to do when the program changes and you then
>have to print 6 pages (the timer would also have to be modified)
>Another thing I have seen done is after the print out are done, prompt the user to confirm they are done.
>and then set the printer back to it normal default...
>I am quite sure there is another - better solution, but I wanted to give you a few ideas
>to start.
>
>Bob Lee
>
>
>>From VFP, I want to Print 3 PDF files in succession to a printer which is not the currently set default printer.
>>ShellExecute appears to only print to the default printer.
>>Using ShellExecute, if I reset the default Pinter and Print the 3 files, then when I restore the default printer to the original printer name, before the printer has not completed it's 3 jobs then I find that the last copies go to the wrong printer.
Anything worth doing is worth doing...The right way!
Previous
Reply
Map
View

Click here to load this message in the networking platform