title: PDFView on landscape
body: <p>I am trying to open local Pdf file from Assest folder in android studio platform using [barteksc] library. I downloaded the library and managed to open the pdf file. However, when I orient the emulator to landscape mode the pdf width will not fit the screen. I googled the issue and the solution is to use the following piece of code. </p>
  
  <pre><code>Configurator.onRender(new OnRenderListener() {
      @Override
      public void onInitiallyRendered(int pages, float pageWidth, float pageHeight) {
          pdfView.fitToWidth(); // optionally pass page number
      }
  });
  </code></pre>
  
  <p>But, I do not know how to implement this code. I wrote the following :</p>
  
  <pre><code>public class Pdf extends AppCompatActivity {
  PDFView pdfview;
      protected void onCreate(Bundle savedInstanceState) {
  
          super.onCreate(savedInstanceState);
          setContentView(R.layout.pdf);
          pdfview=(PDFView)findViewById(R.id.pdfView);
          pdfview.fromAsset("h.pdf").load();
  
          PDFView.Configurator.onRender(new OnRenderListener() {
              @Override
              public void onInitiallyRendered(int pages, float pageWidth, float pageHeight) {
                  pdfview.fitToWidth(); // optionally pass page number
              }
          });
      }
  }
  </code></pre>
  
  <p>And I got this error ... </p>
  
  <p>Non-static method 'onRender(com.github.barteksc.pdfviewer.listener.OnRenderListener)' cannot be referenced from a static context</p>
  
  <p>Plese show me how can I fix this issue. Loads of thanks in advance for any help you may lend.</p>