-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Invalid or corrupted PDF files" is displayed #10639
Comments
Possibly a duplicate of #10562. |
@Snuffleupagus I think this is a different issue with #10562. |
I found the cause of this issue. Why two requests are issued when user clicks that link? I think we can improve this more. WDYT? @timvandermeij @Rob--W |
@simonhong document.querySelectorAll('a[href]').forEach(function(a){
if (a.href.match(/.+.pdf$/)){
a.setAttribute('href', 'chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/' + a.href);
}
}); |
@shge good try. I think it would work for the link that ends |
Do you try to reload the web page after this exception has displayed and the issue will be solved? This exception will be thrown when the pdf data loading in the first time. |
Yes, but it does not work on some pages that require referer information.
|
The referrer thing is a regression caused by a change in Chrome - see #10645 |
I will post this on the brave-browser repository too:
|
This appears to have been resolved when I updated today. My issues with this have been resolved by the most recent update. |
Closing since this seems to work again. |
Attach (recommended) or Link to PDF file here:
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.144.7135&rep=rep1&type=pdf
Configuration:
Steps to reproduce the problem:
What is the expected behavior? (add screenshot)

This is what I can see when I pasted chrome-extension prefixed url or reloading the error pdf page.
(
chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.144.7135&rep=rep1&type=pdf
)What went wrong? (add screenshot)

This is what I can see when click the above link
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):
https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm
The text was updated successfully, but these errors were encountered: