jeudi 26 mars 2015

Prevent PDF file emebeded in iframe from being downloaded (in phone browsers)

I am embedding pdf files in iframe tag like this:



<iframe src="<?php echo $pdf_file['guid']; ?>" frameborder="0"></iframe>


This is working fine in desktop. But when the same page is viewed in phone (Android - Chrome, Firefox) the PDF file is not being displayed but is being downloaded automatically instead.


I want to prevent the download and allow it to be presented in ifrmae tag in phones also. How do I do that ?




Aucun commentaire:

Enregistrer un commentaire