title: Thumbnail View issue in uploaded PDF file (Angular 2)
body: <p>I'm new in angular 2 . I tried to upload a PDF and show its thumbnail in UI  using <code>ng2-pdf-viewer</code> but i'm facing some error like this.</p>
  
  <pre><code>AppComponent.html:10 ERROR Error: Invalid parameter object: need either .data, .range or .url
      at error (pdf.combined.js:357)
      at Object.getDocument (pdf.combined.js:11832)
      at PdfViewerComponent.webpackJsonp../node_modules/ng2-pdf-viewer/dist/pdf-viewer.component.js.PdfViewerComponent.loadPDF (pdf-viewer.component.js:89)
      at PdfViewerComponent.webpackJsonp../node_modules/ng2-pdf-viewer/dist/pdf-viewer.component.js.PdfViewerComponent.ngOnChanges (pdf-viewer.component.js:78)
      at checkAndUpdateDirectiveInline (core.es5.js:10891)
      at checkAndUpdateNodeInline (core.es5.js:12382)
      at checkAndUpdateNode (core.es5.js:12321)
      at debugCheckAndUpdateNode (core.es5.js:13182)
      at debugCheckDirectivesFn (core.es5.js:13123)
      at Object.eval [as updateDirectives] (AppComponent.html:10) 
  </code></pre>
  
  <p>My codes are given below.</p>
  
  <p><strong>app.component</strong></p>
  
  <pre><code>import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
  import {FormsModule} from '@angular/forms';
  
  import { AppComponent } from './app.component';
  import { PdfViewerComponent } from 'ng2-pdf-viewer';
  
  @NgModule({
    declarations: [
      AppComponent
    , PdfViewerComponent],
    imports: [
      BrowserModule,
      FormsModule
    ],
    providers: [],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  platformBrowserDynamic().bootstrapModule(AppModule);
  </code></pre>
  
  <p><strong>app.component.html</strong></p>
  
  <pre><code>&lt;div class="container"&gt;
  &lt;div class="form-group col-sm-3"&gt;
            &lt;label for=""&gt;PDF file&lt;/label&gt;
            &lt;input type="file"  (change)="fileChange($event)" accept=".pdf"&gt;
          &lt;/div&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-5"&gt;
              &lt;div class="thumbnail" style="width: 150px;height: 200px;" (click)="pdfShow=!pdfShow"&gt;
                  &lt;p&gt;click me to view PDF in Iframe!&lt;/p&gt;
                  &lt;pdf-viewer [src]="fileData"
                              [page]="page"
                              [original-size]="false"
                              style="display: block;"
                   &gt;&lt;/pdf-viewer&gt;
              &lt;/div&gt;
              &lt;br&gt;
          &lt;/div&gt;
          &lt;div class="col-md-7"&gt;
              &lt;div *ngIf="pdfShow"&gt;
                  &lt;h4&gt;PDF in Iframe&lt;/h4&gt;
                  &lt;iframe width="500" height="600" [src]="fileData" type="application/pdf"&gt;&lt;/iframe&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>app.component.ts</strong></p>
  
  <pre><code>import { Component } from '@angular/core';
  import { BrowserModule } from '@angular/platform-browser'
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  })
  export class AppComponent {
    pdfSrc;
    ngOnInit() {
    }
  
    fileData: File;
    fileChange(event) {
      let fileList: FileList = event.target.files;
      if (fileList.length &gt; 0) {
        this.fileData = fileList[0];
      }
    }
  }
  </code></pre>
  
  <p>can any one help me.</p>