View Full Version : Embedding PDFs using HTML5

01-18-2013, 03:42 PM
Hello, everyone! I'd like to embed PDF files in the browser (mostly mobile). We'd like to avoid solutions that first must go through Google or what have you for privacy reasons. I know this is possible by way of various services like FlexPaper or PDFTron, but FlexPaper doesn't work so well for a lot of our mobile devices and other services are quite expensive. Is there a simple way to just display the PDFs even forgoing a lot of the additional functionality those other services provide? Or perhaps a nice simple open-source version?

01-18-2013, 09:18 PM
The simplest way to embed a PDF into a web page using any version of HTML is

<img src="mydoc.pdf">

Those solutions you mention are for generating PDFs and not for simply embedding them in a web page.

01-22-2013, 04:41 PM
Thank you. That seems to work okay for the iOS side except it doesn't seem possible to scroll through the content (whereas on the desktop it lets you scroll within the allotted area). Our Android tablets won't render it at all. The main devices accessing the PDFs are Android tablets. Not sure what else to try really.

01-22-2013, 07:20 PM
Have you tried the <object> (http://joliclic.free.fr/html/object-tag/en/) element?

01-22-2013, 09:02 PM
Have you tried the <object> (http://joliclic.free.fr/html/object-tag/en/) element?

Yes indeed. And it works great on desktop or iOS, but the browsers (default and Maxthon) on the Android tablet won't show anything but the "alt :" option.

01-22-2013, 10:08 PM
Are you sure that the browser has a PDF plugin installed so that it can display the PDF inside the browser?

01-22-2013, 10:33 PM
You know, I had to borrow someone else's tablet since mine is being returned at the moment and probably made the mistake of assuming they had one on there too. I will surely try this tomorrow.

01-23-2013, 04:05 PM
I have the Adobe Reader on the tablet but the <img src="theurl.pdf"> and <object> methods don't seem to be working.

<img src="theurl.pdf">
<object data="theurl.pdf" type="application/pdf"
width="100%" height="1200">
alt : <a href="theurl">Feeney</a>

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum