pdf not displayed

Hello VadimDez i have error to implement ng2 pdf viewer in my ionic project :

**_Failed to load resource: the server responded with a status of 404 ()
core.js:1449 ERROR HttpErrorResponse {headers: HttpHeaders, status: 404, statusText: "OK", url: "https://vadimdez.github.io/ng2-pdf-viewer/pdf-test.pdf", ok: false, …}_**

this is my ts  source code :

 constructor(private http: HttpClient,public navCtrl: NavController, 
      public navParams: NavParams,
      public viewCtrl: ViewController) {
      this.http.get('https://vadimdez.github.io/ng2-pdf-viewer/pdf-test.pdf', { responseType: 'arraybuffer' })
      .subscribe((file: ArrayBuffer) => {
        this.pdfSrc = new Uint8Array(file);
        // or directly passing ArrayBuffer
        // this.pdfSrc = file;

in my html source code 
<pdf-viewer [src]="pdfSrc" [show-all]="true"></pdf-viewer>


1 possible answer(s) on “pdf not displayed