title: How to view a pdf using iframe from my website?
body: <p>I have pdf files on my website that I would like to show on a page , I tried :</p>
  
  <pre><code>&lt;iframe src="https://mywebsite.com/files/file.pdf" frameborder="0" width="600" height="550" style="margin:0px; padding:0px;"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>but the file is downloaded.</p>
  
  <p>I tried using google drive :</p>
  
  <pre><code>&lt;iframe src="https://drive.google.com/viewerng/viewer?embedded=true&amp;url=http://mywebsite.com/files/file.pdf" &gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>But I get the html of my login page , I think it automatically redirects to login page.</p>
  
  <p>and I tried to use iframe to access the folder that contains the file:</p>
  
  <pre><code>&lt;iframe src="https://mywebsite.com/files" &gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>But I get forbidden message that tells me to edit my file permissions .</p>
  
  <p>-Is there is a specific permission that I could use to access the folder or the file?</p>
  
  <p>-Is there is a library , function in any web developing language or anything that could help?</p>