title: Pdf Renderer API Android From URL
body: <p>I am looking into the <a href="https://developer.android.com/intl/zh-CN/reference/android/graphics/pdf/PdfRenderer.html" rel="noreferrer">PDF renderer API</a> native to Google Android development. I see the following code example in the documentation:</p>
  
  <pre><code> // create a new renderer
   PdfRenderer renderer = new PdfRenderer(getSeekableFileDescriptor());
  
   // let us just render all pages
   final int pageCount = renderer.getPageCount();
   for (int i = 0; i &lt; pageCount; i++) {
   Page page = renderer.openPage(i);
  
   // say we render for showing on the screen
   page.render(mBitmap, null, null, Page.RENDER_MODE_FOR_DISPLAY);
  
   // do stuff with the bitmap
  
   // close the page
   page.close();
   }
  
   // close the renderer
   renderer.close();
  </code></pre>
  
  <p>I think this example uses from File Object. <strong>How I can get this API to work with a URL from a webserver, such as a document from a website?</strong> How can I load a PDF natively in an Android app that does not require a download of the file onto the local storage? Something like how you can run the Google docs viewer to open the PDF in webview - but I cannot take that approach because the Google docs viewer is blocked in the environment I am in.</p>