Clicking on PDF links will prompt to save file instead of allowing to open it

@Rethanis Grain of salt taken but sounds to me like what makes most sense.

I’ve just tried with other PDFs (related to golf, maybe they hate me for some reason – just kidding I’m a way too pathetic player to be hated, unless it concerns severe damages to the fairway ofc ^_^) and all of them so far (tried 3 ) open nicely within Brave – but they were all on https-secured sites – if this has any influence ?

Would you have any hint on “weird named” PDF files ? It would seem to me that spaces and hyphens are pretty common in file names since quite some time (especially as it gets mapped to a usual ‘%20’).

AlterMind, Rethanis,

My view: The problem is a bug within the PDF processing within Brave Browser.

The bug tripper, is probably the link character string - as “Rethanis” suggested.

If true, then the specific trouble: “fee%202020.pdf” is possibly the trailing 20 after the “%20”.

I’m using a Mac, and the Sample PDF files read OK, using the Brave Browser built-in PDF reader (in both: New Window / New Private Window).

Currently, I doubt that the HTTP / HTTPS is part of the trouble.

1 Like

Hi @289wk – providing feedback on the suggestion to change the PDF readers as extensions in Brave.
I’ve successfully installed both XoDo and Beeline but they kind of mess things up !
Clicking on the PDF link caused following behaviours:

  • simple click on link : the tab closes (crashes?)
  • right click on link > open in new tab : a tab shortly appears then closes (crashes?)
  • right click on link > open in new window : a window briefly opens and closes (crashes?)

In between the above clicks, I went looking into the Extension manager and found this:


and had to ‘repair’ the extension each time.

I’m removing these for the moment as they don’t seem to help in the resolution process – so far.

AlterMind,

Thank you for testing that possibility (other PDF readers). Good to know; and good to have that screenshot (your Reply 23).

Shouldn’t matter in your particular case, you (and I) successfully opened all .pdf files on http://www.pdf995.com/samples/, which Brave upgrades to HTTPS.

I agree, but like I wrote, it could have something to do with the way Brave interprets the URL.

Could you please do the following:

  1. Load http://www.pierpont.be/greenfee/4563568292 in Google Chrome.
  2. Right-click on Tarifs Green Fee 2020Copy link address.
  3. Paste the copied link address in your next comment.

@289wk and @Rethanis on both your last updates :

I have just found another PDF file showing the same symptom of not willing to open in Brave but instead triggering the ‘Save As’ to download. Here is the link:
http://www.tournette.com/download/i/mark_dl/u/4011432133/4637921074/Tarifs%20Greenfee%202021%20-%20Haute%20saison.pdf

Do you experience the same thing ?

@Rethanis

The link address is (I followed your procedure and this is copied via Chrome and pasted here) “http://www.pierpont.be/download/i/mark_dl/u/4010359942/4637741192/GdP%20-%20Greenfee%202020.pdf

And when I actually click the link in Chrome, it opens the default system PDF viewer (and has sucessfully worked like this across all tests I’ve made with changing this default system PDF viewer in Windows 10 via the standard ‘Open with…’ context menu option and then flag the ‘Use as default’)

AlterMind,

“Greenfee%2020” behaves as before, but the trouble could be Brave Browser not passing along what it should, to its built-in PDF reader.

I am not familiar with what those two parties do - what their communications are, when encountering a PDF file link.

Both browsers generate the same link, based on which I can’t really tell how accurate my words regarding Brave’s interpretation of URLs is. What I can tell about the new “troublesome” .pdf is that it follows the same weird naming pattern, I can confirm I can’t open it directly.

AlterMind, Rethanis,

Might be some kind of help for whomever studies the problem:

https://github.com/sandboxie-plus/Sandboxie/issues/817


I created a test PDF file, and saved it with a trick filename (“test_this_PDF_GdP - Greenfee 2020.pdf”); and that opened OK within Brave Browser:

test_this_PDF_GdP - Greenfee 2020

And, I downloaded the Pierpont Greens Fees PDF, and opened that downloaded PDF file OK within Brave Browser:

Pierpont


Problem might be some character encoding issue - the Brave Browser built-in PDF reader not being up-to-date?

Brave successfully opens the problematic .pdf files after you download them, the problem is Brave can’t directly open them within a new window, unlike Chrome and other browsers.

@289wk thanks for the update. It’s not clear to me if with this you opened a bug case ?

I confirm the additional symptom youd describe : once downloaded in a first step it can be opened within Brave (the drawback then being that it clutters the PC with many unnecessary downloads).

Exactly summed up. (neither within a new window, nor a new tab, to be even more precise)

AlterMind,

I did not file any bug case.


I watched the Brave Browser > Developer Tools > Network (while trying to get Brave Browser to open the Greens Fees PDF file directly) . . . and there is a

“crbug/1173575, non-JS module files deprecated”

event. Looked up that, plus “PDF” and found:

https://stackoverflow.com/questions/67191286/crbug-1173575-non-js-module-files-deprecated-chromewebdata-index꞉530595551

Excerpt from that:

crbug-1173575_non-JS_module

Might be helpful for some guru.

@AlterMind

I think it’s worth opening a Github issue so developers can take a look at this. Based on your tests, the issue is Brave-specific so they might be interested in finding the difference between Google Chrome’s PDF Viewer and Brave’s PDF Viewer in this particular case.

You can open a Github issue over here → https://github.com/brave/brave-browser/issues/.

Guys, so I thought I would file a new bug case on the Github as pointed by @Rethanis.
I did some preliminary reading to make sure I would do things as expected and correctly document it. While doing a search with “open PDF in browser” I found this in the results list:
# [Desktop] PDFs from file links are being automatically downloaded instead of opened in Brave #11384
opened one year ago. It does look like the same issue.

Do you confirm this (i.e. should I just add a comment with my info), or do you think I should open a new case ? Thanks for your advice !

Note: the OP raised that case with this PDF not being opened and it still doesn’t open in my Brave browser (and offers to ‘Save As’ to my Downloads folder), meaning it’s a still unresolved issue.

1 Like

Although it looks like a similar issue, OP also claims the issue is present in Google Chrome as well. In your particular case, .pdf files open fine in all browsers but Brave.

Take a look at the name of the file, once again a weird naming pattern.

Hmmm. Yes and no. As far as I’m concerned, Chrome will open the system default PDF viewer (which can be a desktop app or any browser btw, including Brave ) and that always works, at least now. The PDF will open inside Chrome… if Chrome is defined as the default PDF viewer in Windows.
This works fine for both (his and mine) PDF with “weird” naming pattern(spaces, dots, plus sign, etc). I didn’t try that on Linux (yet).

But as in their raised case they refer to a culprit with PDFium from Chromium common to both Chrome and Brave it doesn’t seem to be my situation as behaviours differ between Chrome and Brave – despite the very similar “weird naming pattern” root cause.

I’ll bounce on their topic and let them judge if a separate case ought to be created.
Thanks for your precious insights @Rethanis !

You’re welcome. I’ll subscribe to the Github report because your case got my curiosity, I want to learn the reason for that behavior of Brave :+1:

Comment just added to their case here.

1 Like