AxAcroPDF causes huge form close delay with the latest adobe update (15.023.20053)

338 Views Asked by At

We use the AxInterop.AcroPDFLib.dll in our .net c# application for displaying pdfs on a windows forms application. I've created a demo in order to reproduce this behaviour:

public AxAcroPDFLib.AxAcroPDF m_AxPdf;  
public Form1()  
{  
    InitializeComponent();  
}  


private void button1_Click(object sender, EventArgs e)  
{  
    m_AxPdf = new AxAcroPDFLib.AxAcroPDF();  
    ((System.ComponentModel.ISupportInitialize)m_AxPdf).BeginInit();  
    m_AxPdf.Dock = DockStyle.Fill;  
    panel1.Controls.Add(m_AxPdf);  
    m_AxPdf.Visible = true;  
    m_AxPdf.LoadFile(@"C:\temp\test.pdf");  
    m_AxPdf.setShowToolbar(true);  
}  

Steps to reproduce:

  1. Start the application
  2. Press the button in order to display the pdf content
  3. Close the form

It then will take up to 20 seconds to close the form. Before the update from yesterday (15.023.20053), the form close did work with no problem at all. Is this a known bug, or is there a workaround?

edit: It actually is the dispose of the AxAcroPDF object which takes much longer. Anything i can do in order to get it back to normal, or do i have to wait for an adobe patch?

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
    //takes up to 20 seconds
    m_AxPdf.Dispose();
}
0

There are 0 best solutions below