title: Open local PDF file in WebView using Google Docs
body: <p>There are a million similar questions/answers, all addressing how to open a <strong>remote</strong> PDF file using Google Docs + webview. </p>
  
  <p>None address how to open a <strong>local</strong> PDF file. </p>
  
  <p>Given these strings:</p>
  
  <pre><code>String remotePath = "https://myserver.com/data/files/organization/4/pdf/kalinka1369-1374847709-55.pdf";
  
  String localPath = "file:///storage/emulated/0/Droid Noid/com.story.chapters/kalinka1369-1374847709-55.pdf";
  
  String googleDocsURL = "https://docs.google.com/gview?embedded=true&amp;url=";
  </code></pre>
  
  <p>This works:</p>
  
  <pre><code>webview.loadUrl(googleDocsURL + remotePath);
  </code></pre>
  
  <p>Whereas this does not:</p>
  
  <pre><code>webview.loadUrl(googleDocsURL + localPath);
  </code></pre>
  
  <p>I realize there is a space in <code>localPath</code> and I have tried encoding it to no avail:</p>
  
  <pre><code>String encodedLocalPath = "file:///storage/emulated/0/Droid+Noid/com.story.chapters/kalinka1369-1374847709-55.pdf";
  </code></pre>
  
  <p>Is it possible to open a <strong>local</strong> PDF file using Google Docs + webview? If so, how?</p>