Can't open PDF file located in server in WebView on android device - android-webview

I would like to open a PDF file that located in the server (Here)
in a specific place in my application.
I saw a couple of example how to do it with a webview, but no one works for me.
This is part of my code that should preview the pdf inside a WebView :
WebView webView = (WebView) findViewById(R.id.webView1);
webView.getSettings().setSaveFormData(true);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://mes.mes-ltd.com/itay.pdf");
The solution is just a Blank webview.
Thanks for help!

You can't open a PDF directly in the WebView, it just doesn't support this. You'll need to do something like the solution outlined here.

Related

Pdf viewer on Smartface

I show pdf with webview but, when pdf shows application goes to back and browser shows pdf url. I do not want to application goes to background. Is this possible to open and view pdf document on Smartface?
I tried this;
this.WebView1.openLinkInside = true;
this.WebView1.URL = "http://adadasd.com/adsad.pdf";
it will be supported version 4.3 gonna be released 2nd week of Feb.
You can check the roadmap.
http://www.smartface.io/roadmap/
General > Blob support

How to have image target new window or _blank using FPDF?

In my app the PDF gets opened in the web page and in the below example, when the users clicks on Logo.png it's getting redirected to FPDF site in the same page, but i want to open the link in the new window, instead of opening in the same window, so the users has the PDF opened.
$pdf->Image('logo.png',10,10,30,0,'','http://www.fpdf.org');
Yes I have tried some workarounds for this but its seem to not possible currently. But I have achieved this using ViewerJS.
Just display pdf using viewerjs(pdf js). Just put this line $('a').attr('target', '_blank'); after div.setAttribute('data-loaded', true); inside viewer.js file.
And you will find target blank. Hope this helps!
Sorry, I am pretty sure that this is not possible currently.

JavaScript along with the HTML file is not running in UIWebView

I have placed the HTML Resource files and java script files with the project files in my iphone application. My objective is to build an application which has UIWebview which loads when we tab on the app icon. The UIWebView should actually load the local html content that I have in the resource folder. I can see the HTMl content in the webview but its not running the Javascript..
Checkout stringByEvaluatingJavaScriptFromString: in the
UIWebView Class Reference
Her the actual problem comes with adding the files(javascript and css) in the project. while adding files following option should be clicked that showed in the following image.

iphone webview show html with images and css file

I found some interesting URL http://cubiq.org/rotating-wheel-for-your-iphone-webapps which has rotational menu. Its good. It has html file along with images, css files etc.
In iPhone app, I copied (to root folder) all the files and imported to project. I'm using UIWebView's load request to load the html. But I'm not getting the rotatable menu.
Can some one post me the code (or tutorial or prototype or example) on how to use it?
Also let me know how to catch the even on click on "OK" button at the middle of the html.
Thanks in advance.
checkout IUI : http://code.google.com/p/iui/

how to naviagate html url to other window

Special thanks in advance for sending me answer........
I m the beginner in iphone development. I was calling html page in the UISegment Controller.The url in that page html page is open in the same page. In html page i wrote the following code
www.google.com
But it open that url in UISegment Control of WebView on same page. I want that url open in new page of safari browser in iphone.
You can assign a delegate to your web view.
In the delegate's class, implement -webView:shouldStartLoadWithRequest:navigationType:. Then use UIApplication's -openURL: to close the app and open the page in MobileSafari.
google in a new window