Re: Closing the PDF Document without selection showing Error

Skip to first unread message


Apr 8, 2013, 1:46:56 PM4/8/13
You need to first close the document in the view then dispose the document. Otherwise PDFView is referencing a disposed document which would cause the error.

On Thursday, April 4, 2013 8:10:17 AM UTC-7, vgs naidu wrote:
i am using the PDFTron Control to show the pdfDocumet
We have a implemented the getting Coordinates of the Selected region using MyPDFView.cs and working fine. At the end, in Form_Closing Method we are trying to destroy the objects using the following Code.

It's working fine if I Click on the document and selecting some region.

But in another case, after opening the form if I trying to Close the form with out clicking on the document it showing Error in Form_Closing in the line

And the Error is like below :

" AccessViolationException was Unhandled" and

"{"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."}"

What Could be the reason and how to handle it.

Thank you.

Reply all
Reply to author
0 new messages