Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Unable to open PDF files in browser #4335

Closed
srirambv opened this issue Sep 27, 2016 · 10 comments
Closed

Unable to open PDF files in browser #4335

srirambv opened this issue Sep 27, 2016 · 10 comments

Comments

@srirambv
Copy link
Collaborator

Did you search for similar issues before submitting this one?
Yes

Describe the issue you encountered:
Unable to open PDF files in browser

Expected behavior:
Should load pdf files in browser window

@srirambv srirambv added this to the 0.12.3dev milestone Sep 27, 2016
@bbondy
Copy link
Member

bbondy commented Sep 27, 2016

@diracdeltas does this look like an issue that we already solved in our forked version of pdfjs? We're using the Chromium one now, maybe we need to package our own extension with a different ID for pdfjs.

@bbondy
Copy link
Member

bbondy commented Sep 27, 2016

@srirambv I think if you click a link it works but if you paste directly in the URL bar it doesn't. Can you confirm?
http://martinfowler.com/ieeeSoftware/whenType.pdf

@srirambv
Copy link
Collaborator Author

@bbondy Yes. Only works when you click on a pdf link. Opening the pdf link in a new tab or pasting the link directly in URL bar it doesn't work.

@diracdeltas
Copy link
Member

@bbondy yes this is an issue i fixed in our fork; can we revert to using that for now?

@diracdeltas
Copy link
Member

i also see this error in master, which may be related. it's due to an unsupported API, which is stubbed out in our fork.

[68211:0927/154121:INFO:CONSOLE(0)] "Error in response to extension.isAllowedFileSchem$Access: TypeError: Cannot read property 'onBeforeNavigate' of undefined
    at null.callback (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/pdfHandler.j$:200:23)
    at chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/pdfHandler.js:191:18", sour$e: chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/pdfHandler.html (0)
[68211:0927/154121:INFO:CONSOLE(0)] "Unchecked runtime.lastError while running extensi$n.isAllowedFileSchemeAccess: Access to extension API denied.
    at chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/pdfHandler.js:191:18", sour$e: chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/pdfHandler.html (0)
[68211:0927/154121:INFO:CONSOLE(0)] "Unchecked runtime.lastError while running storage$get: "sync" is not available in this instance of Chrome
    at next (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/telemetry.js:157:39)
    at getLoggingPref (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/telemetry.j$:144:5)
    at maybeSendPing (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/telemetry.js$49:5)
    at chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/telemetry.js:45:3
    at chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/telemetry.js:162:3", source$ chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/pdfHandler.html (0)
[68211:0927/154121:ERROR:extension_function_dispatcher.cc(613)] Unknown Extension API $ extension.isAllowedFileSchemeAccess
[68211:0927/154121:INFO:CONSOLE(0)] "Unchecked runtime.lastError while running storage.
get: "managed" is not available in this instance of Chrome
    at next (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/telemetry.js:157:39)
    at null.callback (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/telemetry.js:
158:9)", source: chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/pdfHandler.html (0
)

@bbondy
Copy link
Member

bbondy commented Sep 28, 2016

Fixed for RC2 here:
e611a31

@bbondy bbondy closed this as completed Sep 28, 2016
@bbondy
Copy link
Member

bbondy commented Sep 28, 2016

we now maintain our own PDFJS fork instead of using the chrome extension unchanged.

@capouch
Copy link

capouch commented Oct 25, 2016

Should opening PDF files work now in 0.12.6 (Linux Slackware)? If it does, I haven't found the magic way to do it. I have tried in regular tabs, private tabs, pasting in file:// URLs, enabling/disabling HTML5 PDF viewer, and no matter what it does the same thing: brings up a file save dialog.

I did find a kludgy workaround: I bookmarked a URL that leads to a PDF, and once I've clicked it, I can use the "Open" button on the page to open my local file. But nothing else, so far, works for me.

@Corporate-Solutions
Copy link

Persistent issue in Android. Just downloaded Brave to tablet two days ago. No PDFs. As if reader is not native. Will not open any PDFs.
Also posted at #12089.

@srirambv
Copy link
Collaborator Author

@Corporate-Solutions Its the same behaviour on Chrome for Android. PDF is downloaded by default doesn't load in-browser

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants