I have an android application that needs to display the pdf files. For this I am using Adobe PDF reader intent and pass the file path to it.
It works fine when the pdf file is present on the sdcard but I am not able to view the pdf file when it is placed on web (i.e. http://www.myweb.com/pdfs/mypdf1.pdf).
Any idea how to do this?
Adobe Reader on Android does not seem to support this feature so far, as it is really simple.
Maybe you could try Adobe Air, but I am not sure the version on Android supports .pdf.
If not, I suggest you could pass the Intent to the browser, and the browser will download it, and then it can be displayed. Maybe there will be some browser that can open .pdf directly as those do on computer, but I am not aware any.
Related
I created a PDF with some files attached and links (in fact annotations) to these files:
When I open the PDF from my computer with Acrobat Reader I'm able to open all files either by clicking directly on the "Attachments" column or clicking on the links (annotations).
But when I try to do the same on mobile (iOS, Android or WP) via Acrobat Reader application (I also tried with Foxit App and few others) it doesn't work:
I can't access to the attachments column
When I clicked on the links (annotations) nothing happen
So, I want to know if someone know a mobile application (no matter of the OS) that is able to open/access to the attachments in a PDF ?
Thank you.
Gerald.
File attachments and other annotations are beyond the scope of most (if not any) mobile PDF viewer. You might have to look around to find a viewer which offers to support these objects; maybe you are lucky.
PDF viewers for mobile devices do evolve quite rapidly, so, things may change within the next few months…
I have a website caching pdfs offline with a .manifest-file.
On the desktop version of Chrome the PDF can be viewed offline inside Chrome. But on the Android Chrome nothing happens when I'm trying to open the cached PDF. No error message, just nothing.
I'm guessing the android default pdf-reader can't find the cached pdf?
Anyone who knows how I can view the PDF in Android Chrome?
Thanks!
That's correct, browsers differ in terms of their built-in PDF support. One method you could explore is using Mozilla's pdf.js, which is a pdf reader built entirely in javascript that works just about everywhere. Make another web page that calls pdf.js and loads the PDF, and make sure all of that is in your cache manifest and you should be good to go.
I have the childbrowser plugin installed and working on my Phonegap application. Works fine for websites but I want to instead view PDFs which have been stored in my assets file.
The link I have to the pdf is currently
Test
But when I do this it trys to navigate to
http://file://android_asset/pdf/Starting-Out_master.pdf
How can I change the link to view the prepackaged PDFs?
You cannot open a PDF using the ChildBrowser. You will need to use the PDF Viewer plugin. Here is a link, sorry that it is in Italian you'll have to use Google Translate or something similar.
http://www.giovesoft.com/2011/08/download-and-open-pdf-with-phonegap.html
Using the WebIntent plugin may also work. Most (but not all) Android phones come with a PDF viewer built-in, so letting the Android OS decide what application installed on the phone to handle the PDF file should work in most cases.
You could get the pdf file URI and open it with the childBrowser plugin's openExternal and let the native browser handle the PDF.
I am downloading PDF file in my application and want to allow user to view it. Is it possible that using webview I can display that pdf file downloaded to SD Card or local memory.
As I know there is workaround in which I can provide the link of pdf file to google url which will open pdf in webview. But it lags and is very slow.
Basic answer, no. You can't open a PDF in a webview; so you either need to fire an Intent to open the file (the file can then open in the default installed app on the device); or write your own PDF reader.
Try to use pdf.js.
See http://www.worldwidewhat.net/2011/08/render-pdf-files-with-html5/
I downloaded its source and placed it in sdcard.
Then I use a WebView to load its index.htm.
It did show pdf file on a webView in sdcard in Android 4.0 device but sometime it show white page. I need to reload it and it finally can show.
Unfortunately, I also tested on Android 2.2 and 2.3 devices. They just show white page, nothing.
I know it make use of html5 canvas technology. I have checked on loading http://html5test.com/ on WebView and have tick on canvas element but still can't show pdf. Strange behaviour. Maybe really depends on Android version.
i want to create an android application in which i have to run ppt which will be present in sdcard. So far i have got to know that the only way to run the ppt is either calling different applications which deal with this or embed that in webview.
Thanks in advance
You cannot embed ppt, doc, excel etc in a Webview in android. Those are MS Office formats. You cannot even do that on a desktop pc with firefox/chrome.
EDIT
If the ppt is online you can use google docs to convert your document to html and than display it:
webview.loadUrl("http://docs.google.com/gview?embedded=true&url=http://myurl.com/mySlide.ppt");
If the ppt is on SD card, either:
a) Open it with default phone application. See How to use an intent to open a ppt with DataViz's Documents To Go
b) you need to convert it to html beforehand. There are many online/offline tools for that. Google "ppt to html converter"
Another possibility (depending if you no need your PPT file into the SDCard) is embed a PPT in a WebView using an iFrame like Office Web Apps or GoogleDocs.
I tested and works, but this options requires to have the PPT file into servers of Office Web Apps or GoogleDocs.