Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think you should use custom library for getting that done .See <a href="https://stackoverflow.com/a/11153195/1450401">this</a> and <a href="http://www.androidpdf.mobi/download" rel="nofollow noreferrer">this</a></p> <p>But there is a way for displaying PDF with out calling another application</p> <p>This is a way for showing PDF in android app that is embedding the PDF document to <strong>android webview</strong> using support from <code>http://docs.google.com/viewer</code></p> <p>pseudo</p> <pre><code>String doc="&lt;iframe src='http://docs.google.com/viewer?url=+location to your PDF File+' width='100%' height='100%' style='border: none;'&gt;&lt;/iframe&gt;"; </code></pre> <p>a sample is is shown below</p> <pre><code> String doc="&lt;iframe src='http://docs.google.com/viewer?url=http://www.iasted.org/conferences/formatting/presentations-tips.ppt&amp;embedded=true' width='100%' height='100%' style='border: none;'&gt;&lt;/iframe&gt;"; </code></pre> <p>Code</p> <pre><code> WebView wv = (WebView)findViewById(R.id.webView); wv.getSettings().setJavaScriptEnabled(true); wv.getSettings().setPluginsEnabled(true); wv.getSettings().setAllowFileAccess(true); wv.loadUrl(doc); //wv.loadData( doc, "text/html", "UTF-8"); </code></pre> <p>and in manifest provide</p> <pre><code>&lt;uses-permission android:name="android.permission.INTERNET"/&gt; </code></pre> <p>See <a href="https://stackoverflow.com/a/11718742/1450401"><strong>this</strong></a></p> <p>Caution : I am not aware of compatibility issues with various android versions </p> <p>In this approach the drawback is you need internet connectivity . But i think it satisfy your need</p> <p>EDIT Try this as src for iframe</p> <pre><code>src="http://docs.google.com/gview?embedded=true&amp;url=http://www.pc-hardware.hu/PDF/konfig.pdf" </code></pre> <p>try <code>wv.loadData( doc , "text/html", "UTF-8");</code> . Both works for me</p> <p><img src="https://i.stack.imgur.com/KHvGO.png" alt="enter image description here"><img src="https://i.stack.imgur.com/HrQh6.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload