title: error converting docx to pdf using pandoc
body: <p>Motivated from the discussion on    <a href="https://stackoverflow.com/q/49113503/6762788">How to convert docx to PDF in r?</a>, I tried to convert .docx to pdf using the following code.</p>
  
  <pre><code>pandoc &lt;- "C:/Users/.../Pandoc/pandoc.exe"
  input &lt;- "C:/Users/.../abc.docx"
  output &lt;- "C:/Users/.../abc.pdf"
  cmd &lt;- sprintf('"%s" "%s" -o "%s"', pandoc, input, output)
  shell(cmd)
  </code></pre>
  
  <p>However, I am getting the "<code>execution failed with error code 1</code>" error.
   What's the solution? If there is some issue running this in R, how can I do this using other tools?</p>