Closed Csontikka closed 9 years ago
What you're seeing here is that the PdfViewer
does not become the owner of the PDF document. What you're supposed to do is dispose of the document yourself. Try changing your code to:
pdfViewer1.Document = PdfDocument.Load("D:\1.pdf");
pdfViewer1.Document.Dispose();
pdfViewer1.Document = PdfDocument.Load("D:\2.pdf");
// Here you should be able to delete D:\1.pdf
Please let me know if this still doesn't work.
Hello,
I started to trying to use PdfiumViewer and I think I found some bugs. (or I do something wrong :)) But first of all thank you! This is the fastest solution for PDF viewing I found so far. Keep it up!
So the first problem:
pdfViewer1.Document = PdfDocument.Load("D:\1.pdf"); pdfViewer1.Document = PdfDocument.Load("D:\2.pdf"); //here I cannot delete D:\1.pdf pdfViewer1.Document = null; pdfViewer1.Document.Dispose(); //no change
After the form closed I can delete all of them.
Regards, Csontikka