I use PdfRenderer class to render pdf. However, the problem is that in this approach I can't make the hyperlinks in the document clickable.
Is there any better way to render pdf in android application?
I am aware of using webview with google docs, but I want the app to work offline so this solution is not suitable.
Try using pdfjs that is used by Mozilla.
Follow this answer
https://stackoverflow.com/a/26086480/10587375
This method works for sure on Android 4.0 and above
Related
I am new to Android and I am studying the possibility of including/embedding a slideshare slideshow (among other contents) into an Android app.
The idea would be receiving from the user the URL of the resource, such as:
"http://es.slideshare.net/slideshow/embed_code/16060200?rel=0"
And in certain section of the app display the slideshow mixed with other contents (text or whatever...)
I have been searching and the only option I saw (I insist I am really new to this...) would be making a webview for that activity... but... Is a webview fullscreen only? Can it be just part of an activty?
I hope I got to make myself understood... otherwise, let's try to clear it out and ask me whatever you may need to understand the question ;)
Thank you very much in advance,
Miguel
PS: I can accept other systems instead of slideshare, what i want is to embed an slideshow
Sounds like what you need is a WebView, just like you said. They can be non-fullscreen as well. Not sure how much this helps, but here's a tutorial on WebView's from the dev site:
Building Web Apps in WebView
If I understand correctly, every WebView based implementation needs WebViewClient.
But looking at the source code for Android 2.2's browser, I can't find any mention of WebViewClient.
How does it work if it doesn't use it?
If it does use it, where is it "hiding"?
It is implemented inside the tabs (see Tab.java).
Currently I'm using pdfrenderer library to render pdf page and convert that page into image and showing in a view.
In this case we can't copy text from pdf page. I want to create a single project which should support both blackberry(Lastest blackberry os run android apps as well) and android.
Most of the libraries which is available are not compatible with blackberry os.
To support both, i want to load pdf file in webview using html5. Is there any way to achive this.
Please help.Thanks in advance.
I think pdf.js can help you.
I've recently search a lot about javascript pdf reader and found this as the best available solution. But I should mention that it still needs a lot to do to be a good solution
Happy Friday to all.
I was wondering if there is a way to open an external link within the app itself? I currently can execute a link, but it opens it in a browser. I would like to open a site or two within the app.
Can this be done?
Oh, please tell me it can be, because this is one of the reasons why I am creating my app in Eclipse instead of Dreamweaver...html can only limit so much stuff!
please and thank you help me figure this out.
Cady
Yes, you need to use a WebView and load the html into it yourself.
Note that by default a WebView only displays html content. The plugins and javascript are off, and it does not handle link clicks, or forward / backward navigation
http://developer.android.com/reference/android/webkit/WebView.html
You can use a WebView to open HTML pages inside your app. There's a nice little tutorial in the docs showing the use of its basic features.
You can use WebView, put it in your layout and load URLs to show websites inside your app.
Yes it can be done, you can use a WebView to load the content inside your activity.
May I know is there any other solution other then using childbrowser plugin to display a pdf in phonegap?
Thanks
I looked into this exact issue when developing an app that views PDF's. The childbrowser plugin is the best route. It's actually quite easy, and you can customize it any way that you'd like. Do you have a particular reason why you can't use the childbrowser?
From what I researched, you could also use 3rd party extensions to display pdf's, but in the end you'll still need to do most of what childbrowser plugin does, cause you will need to create a custom view that gets displayed when javascript is triggered.