I am developing an application that can read PDF as well as it interact the hyperlink and internal anchors.
I am using MuPDF library, which is embedded in Android.
I am able to read the PDF file but how i can read and perform action on internal link and hyperlink?
Can anyone has an idea, how can i read the link and when use clicked on it, it open related page in PDF or in browser.
MuPDF link.
Related
I am making one PDF reader app.
I am using android pdfViewer library
com.github.barteksc:android-pdf-viewer:2.8.2
My issue is their are some links inside my PDF pages. when user clicks on it the link should open in phone's default browser.
Note: I am not using Webview. PDFs are simply stored in assets folder and i am loading it from that folder
I have pdf file download in my device on known location. I want to display it within my application. I tried several pdf viewer libraries like:
https://github.com/JoanZapata/android-pdfview <--- This is deprecated.
https://github.com/jblough/Android-Pdf-Viewer-Library <--- Does not display pdf properly. I mean it has several issues while loading pdf.
https://github.com/barteksc/AndroidPdfViewer <--- So far best I could find over the internet.
But none of the above work on hyperlinks to navigate to certain header within the file.
I know i can display pdf file in Google drive viewer, but I don't want that.
So anyone can suggest me relevant pdf viewer library in android which I can plug in my project?
Use google doc viewer to view pdf without any external library.
String pdf = "http://www.pdf995.com/samples/pdf.pdf";
webview.loadUrl("http://drive.google.com/viewerng/viewer?embedded=true&url=" + pdf);
I am developing an web+cross platform app using Jquery Mobile+PhoneGap+Android. In web app, I am able to open pdf file links within my app page using iframe. But, in Phonegap generated Android build, iframe is unable to render pdf content,it is showing that iframe area as empty.How can I display the pdf file/content, whose src I know at runtime, within android webview. Thanks In Advance.
I've just published my plugin, which can open almost any type of file, which is stored locally on Android device.
Please take a look at: https://github.com/markeeftb/FileOpener
Plugin opens external application which handles the preview of the document.
i am looking for some libraries for converting webpages to pdf on android and have not found any good articles or sources. basically i want to develop a native app that opens up webpages and converts them to pdf on user choice.
I have an app where I've button on a webpage that is rendered inside a webview.
Now on click of button , a pdf file gets downloaded , and the same would then need to be opened inside the same webview.
attach a download listener to the web view and change the url as follows..
"https://docs.google.com/gview?embedded=true&url=https://www.example.com/xxxxxyyyyyxz.pdf"
example
https://docs.google.com/gview?embedded=true&url=https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf
it's a link used to open pdf without downloading it...
I hope it solves your problem..
I've found that the google viewer seems to work within the android browser for viewing online PDF files. You could build a link to your pdf so that it is displayed in the viewer. I've not tried doing that within a WebView though.
UPDATE
The link is dead, there is an explanation of how to get the functionality to still work at this link.
In case this link also dies, here is the relevant section:
While the page is no longer available as it redirects to Google Docs/Drive, you can still use the Google Docs Viewer. Paste this URL in a new tab:
https://docs.google.com/viewer?url=
and then paste the address of the document you want to view online. Here's an example:
https://docs.google.com/viewer?url=http://research.google.com/archive/bigtable-osdi06.pdf
I do not think that the present android chrome based browser can support pdf. There are discussion about the same in android forums ( ex: link1 link2)
Your best bet to show pdf is to have adobe pdf reader for android installed.(or concisely put, not possible in web view)
I don't think any browser other than Chrome supports rendering PDFs without a plugin or third party tool. It's probably easier to let the user use his own app to open PDFs.
I used the IText PDF library mentioned in this thread
Android : Is there any free PDF library for Android for a sample project. You could try getting using this API to get the PDF page as an image. I am not familiar with every aspect of Itext so it might have better way to do this.