ng2-pdfjs-viewer

To install and configure, check the npm package here: ng2-pdfjs-viewer

Github source: ng2-pdfjs-viewer
Access source of this entire demo here: ng2-pdfjs-viewer Demo

Automatic download

html


<!-- your.component.html -->
<ng2-pdfjs-viewer pdfSrc="gre_research_validity_data.pdf" [startDownload]="true"></ng2-pdfjs-viewer>
Note: All physical pdf files such as 'gre_research_validity_data.pdf' and 'pdf-sample.pdf' should be in application's 'assets' folder or public folder.

This demo is built using @MarkPieszak's aspnetcore-angular-universal repo(aspnetcore-angular-universal). It is one of the best new project templates I found for aspnetcore+angular projects.