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

Thread ID:





88353 Jul 20,2009 05:15 PM UTC Jul 21,2009 04:09 AM UTC ASP.NET Web Forms (Classic) 2
Tags: PDF
Jeff Dressing
Asked On July 20, 2009 05:15 PM UTC

I am simply opening a PDF, then setting the page number on the page, then saving and closing it. After this, I cannot open the PDF again until the app gets closed. Why does .Close not close the PDF?

Here is a code snippet:

Private WithEvents mobjPDFDoc As PdfLoadedDocument
mobjPDFDoc = New PdfLoadedDocument(strFile)

'This is inside a loop...
dblHeight = mobjPDFDoc.Pages(intPage).Graphics.ClientSize.Height
dblWidth = mobjPDFDoc.Pages(intPage).Graphics.ClientSize.Width
mobjPDFDoc.Pages(intPage).Graphics.DrawString( _
"Page " & CStr(intPage + intTotalPageCount - 1), font, brush _
, New PointF(dblWidth - 220, dblHeight - 100))

... after done marking pages, save and close it.
mobjPDFDoc = Nothing

For some reason the PDF is still open after I close it. If I try to open it again in code or in Adobe Acrobat Reader, it tells me that it is currently opened by someone. How do I close it?


Jeff Dressing
Replied On July 20, 2009 06:23 PM UTC

I did not see the boolean completely parameter in the close command. After I sent it True, it worked fine.

Sri Subhashini M [Syncfusion]
Replied On July 21, 2009 04:09 AM UTC

Hi Jeff,

Thank you for your interest in Essential PDF.

We were able to view the condition which you mentioned here. The overloaded Close(True) method helps you to close the existing document completely.

Please let me know if you need any information.



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

This page will automatically be redirected to the 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