title: HTTP headers Content-Type for opening pdf,docx,doc,xls in a web browser
body: <p>I trying  a HTTP  content type that can both open both pdf,docx,doc,xls,pptx,  and preview then in web browser</p>
  <p>I have tried these but they are not working</p>
  <pre><code> //This is opening pdf only 
  
  header('Content-Type:application/pdf');
  
  //This is downloading the document 
  
  header('Content-Type:application/vnd.oasis.opendocument.text');
  </code></pre>