ng2-pdf-viewer icon indicating copy to clipboard operation
ng2-pdf-viewer copied to clipboard

Support angular 15

Open Yasmenmohamedali opened this issue 1 year ago • 1 comments

pdf-viewer still support angular 15?

Bug Report or Feature Request (mark with an x)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [ ] Bug report -> please search issues before submitting
- [x] Feature request
- [ ] Documentation issue or request

Yasmenmohamedali avatar Nov 30 '23 09:11 Yasmenmohamedali

For angular 15 you should use "ng2-pdf-viewer": "^9.1.5",

In my case after getting PDF file from server request I set value as

     this.actionsSubject
      .pipe(ofType(emittedDocumentsDownloadPdfDraftSRCSuccess))
      .subscribe(value => {
          this.pdfSrc = {
            url: window.URL.createObjectURL(value.blob)
          };
        }
      );

Then component can be used as documentation example

  <pdf-viewer
      [src]="pdfSrc"
      [render-text]="true"
      [original-size]="false"
      style="width: 100%; height: 500px"
    ></pdf-viewer>

lroura avatar Feb 14 '24 12:02 lroura