Go to the Assets/pdfjs/web/viewer.html file and mark certain controls as hidden. Webview.loadUrl("file:///android_asset/pdfjs/web/viewer.html?file=" + file.getAbsolutePath()) Ĭool thing: If you want to reduce the amount of functionalities / controls. WebSettings settings = webview.getSettings() Adobe Acrobat Reader focuses on speed and simplicity. The annotations and comments you’re going to save on your PDF can then be open and edited on your Android devices. Webview = (WebView) findViewById(R.id.webview) The latest versions of Adobe Acrobat Reader have introduced annotation and commenting features for marking up your PDF documents. Just add the pdfjs files to your Assets directory:Īnd call it the following way: // Assuming you got your pdf file:įile file = new File(Environment.getExternalStorageDirectory() + "/test.pdf") It works on older Android versions, you don't need a special PDF Viewer app for this and you can easily display a PDF inside of your apps views hierarchy. But I really like the approach of Xamarin to make use of the pdf.js from Mozilla.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |