Thursday, April 24, 2014

WebView how to open pdf file


1.WebView how to open a local pdf file: 2.WebView how to download and open the pdf file to open three pdf files after the download is complete how to open a browser or a WebView.? Jiqiu Help
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Well, some online, you find the next
Reply:
1 Local
 Intent intent = new Intent (); 
intent.setAction (android.content.Intent.ACTION_VIEW);
intent.setDataAndType (Uri.fromFile (new File (mFilename)), "application / pdf");
startActivity (intent);


2 Network
WebView loaded network PDF (a)
Reply:
reference to the second floor tantahe reply:
1 local
.
 Intent intent = new Intent (); 
intent.setAction (android.content.Intent.ACTION_VIEW);
intent.setDataAndType (Uri.fromFile (new File (mFilename)), "application / pdf");
startActivity (intent);


2 Network
WebView loaded network PDF (a)

This is done using an external application to load it, you can not open it directly in webview
Reply:
reference to the third floor aixiaoxue520 reply:
Quote: references to the second floor tantahe reply:

1 Local
 Intent intent = new Intent (); 
intent.setAction (android.content.Intent.ACTION_VIEW);
intent.setDataAndType (Uri.fromFile (new File (mFilename)), "application / pdf");
startActivity (intent);


2 Network
WebView loaded network PDF (a)

This is done using an external application loaded it, it can not be opened directly in webview inside

Not
Reply:
references, 4th Floor tantahe reply:
Quote: references to the third floor aixiaoxue520 reply:

Quote: references to the second floor tantahe reply:

1 Local
 Intent intent = new Intent (); 
intent.setAction (android.content.Intent.ACTION_VIEW);
intent.setDataAndType (Uri.fromFile (new File (mFilename)), "application / pdf");
startActivity (intent);


2 Network
WebView loaded network PDF (a)

This is done using an external application loaded it, it can not be opened directly in webview inside

Not

That is not loaded pdf, word and other documents in webView inside need to convert files into html or txt to do?
Reply:
Create a picture or document Can manually web viewer , then go open and read pdf ? may sound complicated, but you can manually customize the operation would be a lot easier, but I do still a novice, I hope that the exhibitions, thank you.
Reply:
The same question, solve it.

No comments:

Post a Comment