Pages

Saturday, May 17, 2014

Embed PDF in HTML Page


To Embed PDF files in HTML Page You can use below snippet of code, It works in most browser versions (Chrome, Firefox, IE,... ).

if it is not supported, it shows the message "The PDF cannot be displayed."

<div id="pdf">
<object width="900" height="1000" type="application/pdf" data="/filepath/filename.pdf?#zoom=85&scrollbar=0&toolbar=0&navpanes=0" id="pdf_content">
<p>The PDF cannot be displayed. <a href="/filepath/filename.pdf" target="_top">download</a>.</p>
</object>
</div>

Above snippet of code sets the zoom to 85%, removes scrollbars, toolbars and nav panes.

Hope it helps J

SOLVED: 'Download Unsuccessful' Error Notification in Android

Problem:
For a while, it has been an exhausting issue to fix with website users that when trying to download pdf files through the android stock browser or android chrome browser or some other browsers.. 
they get a 'Download Unsuccessful' notification.

Solution:
Now it got clear once understood that android file type association requires certain applications to open specific file types..

As long as the file type you are trying to open\download (pdf, rar, zip, word, …) is unknown or not associated with an existing application.. it won't open\download..

So all you need to do is :
·        If you want to open\download pdf file, install Acrobat Reader first through android PlayStore.
·        If you want to open\download rar, zip etc.. download and install Archidroid from android PlayStore.
·        … and so on.

Conclusion:  
At the end it's not an issue in your website you have to fix.. just file association needs to be fixed in users devices.. that's all J