title: PDF to Word using Acrobat SDK
body: <p>OS: Windows Server 2019, Acrobat Pro DC 2021.011</p>
  <ol>
  <li>My C# program calls Acrobat converting PDF to Word.docx.  I used the code from Jie:
  <a href="https://stackoverflow.com/questions/11341073/how-to-convert-pdf-to-word-using-acrobat-sdk">How to convert PDF to Word using Acrobat SDK?</a></li>
  </ol>
  <pre><code>AcroPDDoc pdfd = new AcroPDDoc();
   pdfd.Open(sourceDoc.FileFullPath);
   Object jsObj = pdfd.GetJSObject();
   Type jsType = pdfd.GetType();
   //have to use acrobat javascript api because, acrobat
   object[] saveAsParam = { &quot;newFile.doc&quot;, &quot;com.adobe.acrobat.doc&quot;, &quot;&quot;, false, false };
   var vrc = jsType.InvokeMember(&quot;saveAs&quot;,BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance,null, jsObj, saveAsParam, CultureInfo.InvariantCulture);
  </code></pre>
  <p>Every few days, the function does not create the word file and returns NULL: &quot;var vrc = jsType.InvokeMember&quot;.  Identifying the last good date Acrobat successfully created the docx file, I restore the Server from Backup.  The Acrobat function works.</p>
  <blockquote>
  <p>What may be causing this problem?</p>
  </blockquote>
  <ol start="2">
  <li>In the same StackOverflow post, Subhobroto posted WinPython code to convert PDF to Word.   Using Python 10.3.2, Error</li>
  </ol>
  <pre><code>avDoc = Dispatch(&quot;AcroExch.AVDoc&quot;) # Connect to Adobe Acrobat
  
  # Open the input pdf file
  ret = avDoc.Open(pdfFN)
  
  # Python Error 
  File &quot;&lt;COMObject AcroExch.AVDoc&gt;&quot;, line 2, in Open
  pywintypes.com_error: (-2147352562, 'Invalid number of parameters.', None, None)
  </code></pre>
  <blockquote>
  <p>What is the correct code?</p>
  </blockquote>
  <p>Thanks for help.</p>