Welcome Guest Search | Active Topics | Sign In | Register

PDFViewer.Print Options
Bernhard Queißer
Posted: Monday, November 22, 2021 8:00:33 AM
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

eo_support
Posted: Monday, November 22, 2021 9:47:06 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,066
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!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.