MS Edge - Images render with artifacts
See original GitHub issueSome time ago we started using PDF.js in Egnyte. It works very well, but just now we have some problems with pdf containg images on MS Edge. They render with artifacts sometime. I’m using following viewer flags:
disableStream = true;
disableAutoFetch = true;
But changing them to false does not seem to help.
PDF.js reports no errors and no errors are thrown in console.
All resources (source pdf, screenshots, har files) can be found here: https://phantombit.egnyte.com/fl/Ur3Km8eza6
Configuration:
- Web browser and its version: Microsoft Edge 41.16299.15.0
- Operating system and its version: Windows 10 (OS Build: 16299.19) (I’m running this on virtualBox [image taken from here: ], but these issues appear also when Windows is master OS)
- PDF.js version: 1.9.661
- Is a browser extension: no
Steps to reproduce the problem:
- Open the file with viewer
- In about 50% of cases it renderes with artifacts
What is the expected behavior? Images are rendered correctly
What went wrong? Images are rendered with artifacts on them
Link to a viewer: https://phantombit.egnyte.com/fl/Ur3Km8eza6#folder-link/ click on file icon
Things I checked already:
- I tried disabling webGL (with disableWebGL flag) to check if it’s not related to it - no luck
- I tried disabling range (with disableRange flag) to check if it’s not related to it - no luck
- I tried reproducing it in your demo, but everything works well there.
Generally I suspect that this may be related with network, and sending this file in chunks. The random nature of this bug leads me to this conclusion. But as you have chance to see in attached .har files - there does not seem to be anything wrong with requests. None of them is empty, there are no errors. I’m kinda in dead end here at this point.
Any kind of help/advice is welcome 😃
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:8 (3 by maintainers)
Top GitHub Comments
Reproduced:
PDFJS: 2.0.502 Microsoft Edge 42.17134.1.0 Microsoft EdgeHTML 17.17134
Options:
disableStream = true; disableAutoFetch = true;
give no difference.Library is not stable in Edge - it changes the result after page refresh, sometimes getDocument cannot open PDF at all, sometimes page render freezes forever and there are not errors/warnings in the console. Sometimes there are such warnings:
Warning: Ignoring invalid character "105" in hex string
Warning: Ignoring invalid character "107" in hex string
Warning: Ignoring invalid character "22" in hex string
We are also getting the same problem, a PDF containing an image will occasionally render with artifacts/offsetted positioning/wrong colors.