Best method to render a pdf on a view in android -


I know that there are many libraries available that are not suitable for commercial use, such as mupdf.my company is a startup and There is not a lot to spend in this situation. I am working on a magazine app. Can anyone recommend a good open source library to use for providing a single PDF or if this is not possible, should I pay? Thanks in advance

You can use the webview with Google Docs.

  & lt; LinearLayout xmlns: Android = "http://schemas.android.com/apk/res/android" xmlns: tools = "http://schemas.android.com/tools" Android: layout_width = "fill_parent" Android: Layout_height = "Fill_parent" & gt; & Lt; WebView Android: id = "@ + id / wv" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" />   

WebView wv = (WebView) findViewById (R.id.wv); Wv.setVerticalScrollBarEnabled (true); Wv.setHorizontalScrollBarEnabled (true); . Wv.getSettings () setBuiltInZoomControls (true); Wv.getSettings () setJavaScriptEnabled (true). Wv.setWebViewClient (new WebViewClient ()); Wv.loadUrl ("https://docs.google.com/file/d/0B8ZDVNCvRWK8c3YzQVFaWjg1bEU/edit") // PDF uploaded to Google Docs In some cases, users are required to login and they require permission from the doctor's owner.

You can use intentions to have a PDF reader app in your phone.

  file file = new file ("/ sdcard / example.pdf"); If (file.exists ()) {Ury Path = Uri.from file (file); Intent = intent (intent.ACTION_VIEW); Intent.setDataAndType (path, "application / pdf"); Intent.setFlags (Intent.FLAG_ACTIVITY_CLEAR_TOP); Try {StartActivity}; } Catch (ActivityNotFoundException e) {Toast.makeText (OpenPdf.this, "There is no application available to view PDFs", Toast.LnnGHIHORT). Show (); }   

APV PDF Viewer

The APDF Viewer.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

jsp - Google line chart x-axis shrinks on transition -

java - Reaching JTextField in a DocumentListener -