I have to show PDF file on my website so I have done coding using <iframe>
but the issue is when I open my website, PDF file starts downloading instead of view.
Here is my code
<?php
$pdf = 'http://'. $_SERVER['SERVER_NAME']."/truwood/".$_REQUEST['pdf'];
echo "<iframe src=\"$pdf\" width=\"100%\" style=\"height:600px\"></iframe>";
?>
NOTE: I have installed IDM (Internet Download Manager) to my laptop and I think it's the issue from IDM only.
Please suggest something that prevents auto download from any third party software in PHP.
Thanks in advance!