-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Description
Attach (recommended) or Link to PDF file
I am experiencing an error when trying to read a PDF using a Blob URL with PDF.js version 4.7.76 and above. The error message is as follows:
network.js:276 Uncaught TypeError: Failed to construct 'Headers': Invalid name
at PDFNetworkStreamFullRequestReader._onHeadersReceived (network.js:276:29)
at NetworkManager.onStateChange (network.js:119:22)
here is the error i got in version 4.7.76 and latest

when i using below version its work normally
Web browser and its version
Google Chrome
Operating system and its version
Windows 11
PDF.js version
4.7.76 above
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
- Load a PDF file using a Blob URL with the following code:
const blob = new Blob([/* PDF data */], { type: 'application/pdf' }); const url = URL.createObjectURL(blob); pdfjsLib.getDocument(url).promise.then(function(pdf) { // Handle PDF loading });
- Observe the console for errors.
What is the expected behavior?
The PDF should load successfully without any errors.
What went wrong?
The error message appears in the console, preventing the PDF from loading.
Link to a viewer
No response
Additional context
No response
