I want to View PDF file within my Android Application. Currently I am using below code to view PDF file,
webView.loadUrl("http://docs.google.com/gview?embedded=true&url=http://www.xyz/docs/pdf1.pdf");
I don't want to use above method i.e. Google Doc, as it shows light blue title with two small magnifying lens for zoom in-zoom out, i just want to view the plain PDF, where zooming is done by fingers. Is that possible?
Related
I'm extremely new to programing in its entirety, and have been slowly learning by tweaking an open source messaging app. One thing I'm trying to implement is having animated .gif messages play in the chat with rounded corners, and cannot for the life of me find anything about this that works for me. I can either have rounded corners via roundedimageview but gifs don't play in the chats, or I can have gifs play in chat with the normal imageview but not have rounded corners.
I've attempted to add a cardview to get the result I'm after, however every example I find on how to add it results in the app crashing whn loading media files.
The source code can he found here: https://codeberg.org/RogueRen/cheogram-android-modern
And the file controling the images I'm wanting to work on are in src/main/layout/message_content.xml
Attempted: Rouded image view, standard image view, card view, card view containing an image view
Do we have some clear guide on how to generate pdf in android which includes tabular data too, with custom fonts like devnagri etc? I have tried itext pdf but text other than English shows blank. Any free or paid library will be helpful.
If you can draw it on screen then you can draw it to a pdf with the built in PdfDocument Class as you can use any laid out view (either got from what is already on screen or manually laying it out yourself) and then use the View's draw method to draw it to the PDF.
So for the tabular data you can use a TableLayout or other methods and the standard fonts available to your app.
Note the Pdf is a bitmap of the contents (e.g. the text is not editable)
Hello I am looking at a type of drawing application that views images and would like to mark them up. Now I can load regular jpg and pngs, but our client has images in a pdf file. I am wondering if there is a way to display these on an image view in android.
I am trying to make an image map similar to AndroidImageMap. Now, i need to know whether the same implementation with android webview is possible? Because, the image map can be processed in the server side and implemented as HTML image map. If we use to display the HTML image map's URL in a webview, then how can the click events be recognized from the webview co-ordinates clicked?
Note : I need to perform respected action when the corresponding image map co-ordinates clicked.
I have an Android WebView loaded with a html file(actually stored in some folder under sdcard) that is having one/two/three image(s). Is it possible to drag-drop any one of those images?
If its possible, below are my doubts
When i drag an image from (x1,y1) place and drop it in another (x2,y2)place, How can i change the original source file code as the image place is changed ?
When i open the same html file in next time (using default html viewer or my app), i should see the image in (x2, y2) place. Isn't it possible ?
I tried this drag ImageView inside a WebView. But it is just adding an imageview to webview. (So, when i run the same app next time, i don't see the image in the place where i dropped it in first run.) But i need to drag an image presented in source html file. So After every drag-drop, Do i need to render the webview content and create a new html file to see the image in dropped location?
Is it possible to read the android-webview content? (like we read the web page content in java).
Can anyone clear my doubts and suggest me a better way if iam going/thinking wrong?
I don't think it possible (without using some not trivial tricks) to implement the drag and drop as you wish. for the other point's you raised - if the file is on your sd - why not just parse the html file and get the pictures positions and source link and use it to implement the drag and drop on your own? after all- the html file is an xml file which contains attributes which defines positions/links/images/text