title: how to display pdf in new tab when clicking on link without download?
body: <p>I have tried this code. but it is asking for download.it is not getting opened.</p>
  <pre><code>&lt;a href=&quot;pdffileurl&quot; target=&quot;_blank&quot; class=&quot;nav-link&quot;&gt;product&lt;/a&gt;
  </code></pre>
  <p>I have also tried this js code. but didn't work.</p>
  <pre><code>window.open(&quot;pdffileurl&quot;,&quot;_blank&quot;)
  </code></pre>
  <p>I have tried this php code as well. but didn't work.</p>
  <pre><code>$file = 'filename.pdf'; 
  $filename = 'filename.pdf'; 
  header('Content-type: application/pdf'); 
  header('Content-Disposition: inline; filename=&quot;' . $filename . '&quot;'); 
  header('Content-Transfer-Encoding: binary'); 
  header('Accept-Ranges: bytes'); 
  @readfile($file); 
  </code></pre>
  <p>inshort i have tried all the possible ways from my side. but every time when i click on link it is redirecting me in new tab but pdf is not getting opened instead it is asking for download.</p>