Reputation: 117
Hi StackOverFlow Community, I am trying to create an android app in which i had to show the Syllabus of our college comprising of various branches,for which i had the data in PDF format of 100's of pages.Now what is the best way to display all the text for my users.I myself got some ideas but don't know how to implement them they are
Any other effective methods are welcomed along with tutorials as i am new here and any idea of implementing the first or second method also please.Sorry if i had said any thong wrong, Thank you.
Upvotes: -2
Views: 165
Reputation: 2211
Try this code for opening the pdf file.
public class MyPdfViewActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
WebView mWebView=new WebView(MyPdfViewActivity.this);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setPluginsEnabled(true);
mWebView.loadUrl("https://docs.google.com/gview? embedded=true&url="+LinkTo);
setContentView(mWebView);
}
}
Upvotes: 1
Reputation:
Use this Android-Pdf-Viewer-Library to open pdf in your android application and its also save your lots of time.
Upvotes: 0