06-19-2011 07:32 AM
PlayBook has built in support for HTML5 but I couldn't embed a PDF in an HTML page using embed tag. Embedding of PDF is a feature of HTML5. Even the browser for Playbook doesn't support this. Please check this link in PlayBook browser. http://blogs.adobe.com/pdfdevjunkie/2007/08/using_
06-19-2011 08:25 AM
I'm not sure that embedding specifically a PDF in a HTML is part of the HTML5 spec, but our browser does support embedding Flash files.
I believe the only way you will likely be able to launch a PDF is to use the new file open method that will be available on the PlayBook in the next week or so.
This will open a local file using the application who has registered as the default editor which should be the PDF reader.
06-19-2011 11:17 AM
HTML5 has an object tag which enables to embed pdf file into an HTML page without the need of other plugins. I suppose Playbook's browser is having webkit engine, so it should be working same as that of a Chrome browser. I've tried a sample in simulator, but I couldnt get that to work. But when I tried the same using a ripple emulator with Chrome plugin I could see the embed PDF file. Please see this link for Object tag details. http://www.w3schools.com/html5/tag_object.asp.
So, is that a bug on the simulator or will it be the same in device too. Could you please let me know if this works in a real device.
06-19-2011 12:12 PM
While the <object> tag syntax is a standard tag in HTML5 it requires a plug-in or add-on for the browser to render the content that's embedded inside. This is the same way you embed flash in the browser which requires a browser plug-in and it's not included in the HTML5 standard.
On Chrome, it packages Flash with the browser and the Adobe PDF viewer on your desktop will have created a NPAPI plug-in for use with Chrome and other browsers.
The PlayBook does have a PDF reader distributed with it which is not on the simulator. Whether or not they have created a PDF viewer plug-in for the adobe reader into the browser is a good question. I don't have my PlayBook on me right now to test out your link to see if it was built in or not.
06-20-2011 12:09 PM
I was able to test the sample page in PlayBook browser. That feature is not enabled for PlayBook browser presently. I would like to know if that will be included in coming releases since that is a generic feature.
Also, about the open file API which was mentioned before. Will I be able to open a PDF file in my WebWorks app without navigating away to default PDF reader app?
06-20-2011 12:18 PM
I belive the file.open() would launch into the PDF reader. It wouldn't stay within your application.
09-08-2011 01:50 PM
to follow what was said, i've been hitting my head on my desk for the past two days trying different ways to embed a PDF to stay within an app.
so thought i'd get an official and straight answer from someone from RIM, is it or isn't it possible to do this? i don't want it to launch outside of the app, i want it to display within the app. i've done this on the iOS platform and it performs seamlessly and easily, i just don't understand why it's so difficult on the playbook platform, it's quite restrictive.
09-11-2011 08:38 PM
The difficulty of reading pdf on browser is serious. pdf pages are a part of many websites and a browser that does not open them for direct reading cannot claim to give the "full web experience".
I can live grudgingly with the workaround of saving a pdf file and then reading it with separate app which works 90% of the time but there are situations where this does not work. For example "Directors Desk" (a website you would expect a "professional grade" tablet to interface with seamlessly) is basically a database of pdf documents, clicking on a document link opens a page with link like eg https://secure.directorsdesk.com/includes/popup.as
a new browser tab opens with a Directors Desk message about loading in progress but it never completes and the page remains blank. Pressing and holding the link does not provide an option of downloading the document file.
When is RIM going to fix this obvious browser flaw by embedding a pdf reader or providing a plugin or something?