Rank: Newbie Groups: Member
Joined: 8/6/2021 Posts: 5
|
How can I tell when the print job is finished ... or how can I wait for it?
PdfViewer1.Load(Filename)
PdfViewer1.Print()
' If I quit here the job will also be deleted, is there an event?
Best Regards Bernhard
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, The Print method returns a WaitableTask object that you can either wait on or be notified when done. To wait on you use:
Code: C#
PdfViewer1.Print().WaitOne();
To be notified when done you can use:
Code: C#
PdfViewer1.Print().OnDone(()=>
{
//code to run when print is done
});
Hope this helps. Thanks!
|