1 Reply Latest reply on Nov 24, 2009 11:59 AM by MichaelKazlow

    delete or unload current PDF from Reader Plugin


      Background: I am creating PDF with PrinceXML. I want to adjust the tracking on a paragraph in the PDF. So I select a unique piece of text, match it in the starting document, add a tracking attribute to the text, and re-create the PDF using PrinceXML.


      I have to delete the current PDF in order to create the revised PDF. When I was using the AxAcroPDF1 control in VB.NET all I needed to do was


      1)                If File.Exists(sPDFoutputName) Then File.Delete(sPDFoutputName)


      Now I am trying to do the same thing but instead of using the AxAcroPDF control I am trying to do it with WebBrowser and


      2)       WebBrowser1.Navigate(sPDFoutputName + "#" + sPDFargument)


      I want to jump to the same page that I was on so set the page to open in the sPDFarguement variable.

      Now when my program tries to delete as in #1 above I get error message that file is locked/in use.


      Question: How do I unload/close/unlock file in the webbrowser so I can delete it?