I'm using PDF.Js to embed PDF file for preview, and I removed the script of download and open files from the viewer.js
, but when I test the page and PDF file try to show, the Internet Download Manager download it and abort the preview .. after search I found that using object
instead of iframe
may solve the problem, but it didn't work the pdf viewer appeared white, what can I do to prevent auto download ? or using another way (Plugin) to show PDF file content.
<iframe
class=pdf
webkitallowfullscreen=
mozallowfullscreen=
allowfullscreen=
frameborder=no
width='.$width.'
height='.$height.'
src='.$baseurl.'/assets/pdf/web/viewer.html?file='.urlencode($pdf_url).'
data-src='.$pdf_url.'>
'.$pdf_url.'
</iframe>