title: Convert Word doc and docx format to PDF in .NET Core without Microsoft.Office.Interop
body: <p>I need to display Word <code>.doc</code> and <code>.docx</code> files in a browser. There's no real client-side way to do this and these documents can't be shared with Google docs or Microsoft Office 365 for legal reasons.</p>
  
  <p>Browsers can't display Word, but can display PDF, so I want to convert these docs to PDF on the server and then display that.</p>
  
  <p>I know this can be done using <code>Microsoft.Office.Interop.Word</code>, but my application is .NET Core and does not have access to Office interop. It could be running on Azure, but it could also be running in a Docker container on anything else.</p>
  
  <p>There appear to be lots of similar questions to this, however most are asking about full- framework .NET or assuming that the server is a Windows OS and any answer is no use to me.</p>
  
  <p>How do I convert <code>.doc</code> and <code>.docx</code> files to <code>.pdf</code> <em>without</em> access to <code>Microsoft.Office.Interop.Word</code>?</p>