Q: I have tried using PDFNet and am having a problem closing a
application has a requiment to allow the users to open a PDF document
they can load another PDF document without closing the window. In my
I first check if a document is already loaded in the PDFView control.
one is already displayed I call Close() on it before loading the next
But when I do that the application hangs after setting the new
Any help would be appreciated.
A: You would need to first associate the new document with an existing
PDFView, then close the old document. For example,
PDFDoc old_doc = pdfViewer.GetDoc();
// set the new document into the PDF viewer
// Close the old doc.
if (old_doc != null) old_doc.Close();