VadimDez / ng2-pdf-viewer

📄 PDF Viewer Component for Angular
https://vadimdez.github.io/ng2-pdf-viewer/
MIT License
1.3k stars 419 forks source link

PDF viewer not rendering on dev environment (working fine locally) #1058

Open MuhammadHammadTEKenable opened 9 months ago

MuhammadHammadTEKenable commented 9 months ago

The project where I'm trying to embed pdf viewer is build on angular 12.2.15 and I'm using 7.0.0 version of ng2-pdf-viewer. I'm converting pdf file into base64 and viewing it on pdf-viewer. on local environment its working fine. but on dev environment it is not rendering pdf.

The code

<div *ngIf="pdfChecked && contentPdfBase64?.length > 0 && selectedFile"> <pdf-viewer [src]="contentPdfBase64" [zoom-scale]="'page-width'"></pdf-viewer> </div>

dev tool rendered html

image

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
- [ ] Feature request
- [ ] Documentation issue or request
MuhammadHammadTEKenable commented 9 months ago

@VadimDez