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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Closing a PDF Document

Thread ID:





132034 Aug 9,2017 09:36 AM UTC Aug 14,2017 10:00 AM UTC WPF 3
Tags: PdfViewer
David Partington
Asked On August 9, 2017 09:57 AM UTC

We have an application where the user needs to preview a PDF file and if it's the correct file then move it to another location (e.g. a NAS).

The problem is (as with Adobe Reader) the file remains open / in use while the viewer is viewing it.
We tried calling both  Unload() as well as LoadedDocument.Close() functions but they don't seem to close the file and the Unloaded event doesn't get called until we close the window.

Is there a way to close this PDF file & release the file so we can move it without destroying the control / closing the window each time since we need to move this file then look at the next one.

Priyanga Elangovan [Syncfusion]
Replied On August 10, 2017 01:12 PM UTC

Hi David,

Thank you for contacting syncfusion support.

Yes, it is possible to unload the current loaded document and to view the new PDF document in PdfViewerControl without closing the window each time. We have prepared the sample to meet your requirement. We can unload the loaded PDF document using Unload API of the PdfViewerControl. We have included the code snippet to unload the loaded PDF document in unload button of the sample. You can use the “open” button in the PdfViewerControl to open the new PDF document in PdfViewerControl.

Please find the sample from below link.

If our definition of this issue is different from your requirement, then let us know the specific details, so that we can work towards fulfilling your requirement.


David Partington
Replied On August 11, 2017 10:32 AM UTC

Thanks, your sample project was much appreciated and finally helped us to figure out the issue.

Your sample project loaded the PDF in to the viewer in the window loaded event rather than how/when/where we were loading it.  Once we changed to using the window loaded event we were able to delete / move the file once the dialog was closed.



Ayswarya Krishna Kumar [Syncfusion]
Replied On August 14, 2017 10:00 AM UTC

Hi David, 
A support incident to track the status of the reported issue has been created under your account. Please log on to our support website to check for further updates.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon