Integrate PDF Viewer into my Existing Angularjs Project

30 views Asked by At
if (res.status === 200) {
                    vm.TaskReport = res.data;

                  
                    var a = document.createElement("a");
                    document.body.appendChild(a);
                    a.style = "display: none";
                    var blob = new Blob([vm.TaskReport], {
                        type: "application/pdf"
                    }),
                        url = window.URL.createObjectURL(blob);

                    $window.open(url, "_blank");
                    $rootScope.showToaster('success', 'Successfully', "Report Download");

                }

In this already existing code, the generated pdf files are opening in the new tab.

I want to integrate a pdfviewer(PDFtron) and the generated pdf to be opened in that PDFtron. So I how can integrate a PDFtroninto my existing angularjs project?

0

There are 0 answers