title: How to convert pdf to docx in libreoffice 6.4?
body: <p>I have libreoffice 6.4 installed in my ubuntu 18.04 container.</p>
  <p>The goals is to convert a pdf file to docx.</p>
  <p>I have already tried these commands :</p>
  <pre><code>libreoffice --headless --convert-to docx:&quot;Microsoft Word 2007/2010/2013 XML&quot; /pdf/pdf.pdf --outdir /pdf
  
  libreoffice --headless --convert-to docx:&quot;Microsoft Word 2007-2013 XML&quot; /pdf/pdf.pdf --outdir /pdf
  
  libreoffice --headless --convert-to docx:&quot;MS Word 2007 XML&quot; /pdf/pdf.pdf --outdir /pdf
  
  libreoffice --headless --convert-to docx:writer_MS_Word_97 /pdf/pdf.pdf --outdir /pdf
  
  libreoffice --headless --convert-to &quot;docx:writer_MS_Word_2007&quot; /pdf/pdf.pdf --outdir /pdf
  
  libreoffice --headless --convert-to docx:writer_OOXML /pdf/pdf.pdf --outdir /pdf
  
  libreoffice --headless --convert-to doc /pdf/pdf.pdf --outdir /pdf
  
  libreoffice --headless --convert-to &quot;docx:writer_MS_Word_2007&quot; --outdir /pdf pdf.pdf
  </code></pre>
  <p>But they always return this message :</p>
  <pre><code>convert /pdf/pdf.pdf -&gt; /pdf/pdf.docx using filter : writer_MS_Word_2007
  Overwriting: /pdf/pdf.docx
  Error: Please verify input parameters... (SfxBaseModel::impl_store &lt;file:///pdf/pdf.docx&gt; failed: 0x81a(Error Area:Io Class:Parameter Code:26))
  </code></pre>
  <p>Can anyone give me a clue on what's going on?</p>
  <hr />
  <p>UPDATE :</p>
  <p>I tried this command :</p>
  <pre><code>libreoffice --infilter=&quot;writer_pdf_import&quot; --convert-to docx  --outdir /pdf /pdf/pdf.pdf
  </code></pre>
  <p>and it returned this message :</p>
  <pre><code>convert /pdf/pdf.pdf -&gt; /pdf/pdf.docx using filter : Office Open XML Text
  Overwriting: /pdf/pdf.docx
  </code></pre>
  <p>I can see it needs the <code>--infilter--</code> parameter, since the input file is a pdf.</p>
  <p>But, it's using <code>Office Open XML Text</code> filter, I need to switch it to <code>Microsoft Word 2007-2013 XML</code>, how can I do that?</p>
  <p>I already tried these and not working :</p>
  <pre><code>libreoffice --infilter=&quot;writer_pdf_import&quot; --convert-to docx:&quot;Microsoft Word 2007-2013 XML&quot;  --outdir /pdf /pdf/pdf.pdf
  
  libreoffice --infilter=&quot;writer_pdf_import&quot; --convert-to &quot;docx:Microsoft Word 2007-2013 XML&quot;  --outdir /pdf /pdf/pdf.pdf
  
  libreoffice --infilter=&quot;writer_pdf_import&quot; --convert-to &quot;docx:writer_MS_Word_2007&quot;  --outdir /pdf /pdf/pdf.pdf
  
  libreoffice --infilter=&quot;writer_pdf_import&quot; --convert-to docx:&quot;writer_MS_Word_2007&quot;  --outdir /pdf /pdf/pdf.pdf
  
  libreoffice --infilter=&quot;writer_pdf_import&quot; --convert-to docx:writer_MS_Word_2007  --outdir /pdf /pdf/pdf.pdf
  </code></pre>
  <p>they always return this message (same as above) :</p>
  <pre><code>convert /pdf/pdf.pdf -&gt; /pdf/pdf.docx using filter : writer_MS_Word_2007
  Overwriting: /pdf/pdf.docx
  Error: Please verify input parameters... (SfxBaseModel::impl_store &lt;file:///pdf/pdf.docx&gt; failed: 0x81a(Error Area:Io Class:Parameter Code:26))
  </code></pre>