We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Closing PdfLoadedDocument does not remove view from PdfViewerControl

After calling PdfLoadedDocument.Close(true) I've tried several things to close its view in a PdfViewerControl but nothing works.  What do I need to do?

2 Replies

CB Chuck Berg April 1, 2015 12:54 AM UTC

My code now looks like this...

private void CloseLoadedDocument()

{

     if (this.pdfLoadedDocument != null)

     {

         this.pdfLoadedDocument.Close(true);

         this.pdfLoadedDocument = null;

         this.DocumentViewControl.Unload();

         this.DocumentViewControl.UpdateLayout();

     }

}

but the display still doesn't clear until I call this.DocumentViewControl.Load(newDocument);



SS Sathish Sivakumar Syncfusion Team April 1, 2015 12:25 PM UTC

Hi Chuck,

We are not able to reproduce the issue “Closing PdfLoadedDocument does not remove view from PdfViewerControl” from the code snippet you have provided. We have attached the Sample with which we tried to reproduce this issue. Please modify this sample or provide us a simple sample with which this issue could be reproduced.

http://www.syncfusion.com/downloads/support/forum/118691/Sample-131548560.zip

Regards,

Sathish S.


Loader.
Up arrow icon