stephanrauh / ngx-extended-pdf-viewer

A full-blown PDF viewer for Angular 16, 17, and beyond
https://pdfviewer.net
Apache License 2.0
450 stars 167 forks source link

ngx-extended-pdf-viewer not working after angular upgrade. #2325

Closed manzoorsharif123 closed 1 month ago

manzoorsharif123 commented 1 month ago

Hi Stephan.

After updating Angular version from 6.3 to 17, PDF viewer is not not working and not showing any content in UAT environment. In dev / local it is working perfectly fine.

Describe the bug See the screenshot

image

Version info

Demo PDF file Many errors happen with specific PDF files only. So please add a PDF file (after checking the copyright of the PDF file first!)

Leadership Grant.pdf

stephanrauh commented 1 month ago

You need to configure your server such that it detects *.mjs files as JavaScript files. I've described this for several servers here: https://pdfviewer.net/extended-pdf-viewer/troubleshooting

I'm not sure why my library switches to ES5 files. Maybe that's because I've raised the minimum required browser version, and your browser is older. Or maybe updating to version 20.0.1 helps. One of the versions I've published didn't detect the correct browser version correctly. However, as far as I remember, I quickly uploaded a patch version fixing this bug.

BTW, sorry for answering late - I was busy during the last couple of days.

stephanrauh commented 1 month ago

As usual, I'd appreciate your feedback. I've closed the bug because I believe my hints help you, but it'd be nice to know for sure.