How to add pdf.js and viewer.html to angular 2 application.(With Optional aspnet core/webapi/mvc backend report generation using MS Local RDLC report viewer)
- copy the 'web' and 'build' folders from https://github.com/mozilla/pdfjs-dist under your application's assets folder.
- Get/Create your `Blob() object
this.http.get(url, { responseType: ResponseContentType.Blob }).map(
(res) => {
return new Blob([res.blob()], { type: fileType });
});
- Create url using blob and supply to viewer.html