Invalid PDF structure when opening file without .pdf extension

Which product are you using?
PDF.js Express Viewer

PDF.js Express Version
8.7.5

Detailed description of issue
I have integrated PDF JS express in my project by using manual setup mentioned in PDF.js Express Plus Download & Integration | Documentation.
By completing this steps i can open the demo PDF link provided by PDF JS
ex :
https://pdftron.s3.amazonaws.com/downloads/pl/webviewer-demo.pdf

I have encountering issue while using the PDF.js Express library. Specifically, I am experiencing problems when trying to open PDF files that do not have the .pdf file extension.

The issue is that when I attempt to load a file that does not have the .pdf extension, I am receiving an “Invalid PDF structure” error. This occurs for files that I have confirmed are valid PDF documents.

PDF link example : http://localhost:8080/app/mobileApp/mobileAppPdfViewer.jsp?file=%2Fapp%2FeBillViewerServlet%3Fkey%3DdYiE7hEhQBLIMimF4EH9fWlOHD9dOw08bK8sHp41WtmTc3ctyVLs5W%252BJVHQZr3o%252FK6aF2kUFtUnJznI36XCV0sp52nz95h5t5fPsePWunh4%253D

Expected behaviour
PDF should be load without giving invalid PDF structure error

Does your issue happen with every document, or just one?
It does happen with the same type of PDF URL link

Link to document

Thanks

Hi there,

Unfortunately that PDF is a localhost domain so it is not accessible.

When you open the document via loadDocument API, could you please try specifying the
extension?
Also if it is a blob format, then it should work as expected:

Best regards,
Kevin Kim