I use “GroupDocs.Viewer 20.3.0 for .NET” library to render various documents, passing data as System.Stream to Viewer and rendering its data into HTML.
Viewer processes streams in a separate worker thread using System.Task to prevent blocking GUI when document is being rendered. I’m facing problems with some data which is being processed for a long time.
For example, 200Mb archive file passed as a Stream to GroupDocs.Viewers.Viewer are being processed for a couple of minutes.
I want to cancel current stream loading / rendering if user has chosen another document while the current one is still being processing by the Viewer.
Is there any possibility to cancel stream loading stage or data rendering stage on GroupDocs.Viewers.Viewer side (for example by passing CancellationToken) or how this cancellation operation can be achieved?