Error = Invalid PDF structure, while viewing and downloading any PDF file

bug

#1

<----Please try to adhere to this template when reporting bugs and delete this top section between and including the arrows when posting! ---->

Description of the issue:
PDF file fails to open or to be downloaded

Steps to Reproduce (add as many as necessary):

  1. I just click to open/download on any PDF file link
  2. Get the error on every website, especially those where I’m logged in (bank, webmail, shopping website…), while it works with Safari without any problem.

Actual Result (gifs and screenshots are welcome!):
PDF.js v2.0.673 (identifiant de compilation: 31012570)
Message: Invalid PDF Structure

Expected result:
PDF to be opened or downloaded

Reproduces how often: each time

Brave Version(about:brave):
Brave is up to date
Version 0.55.22 Chromium: 70.0.3538.77 (Build officiel) (64 bits)

Reproducible on current live release (yes/no): yes

Additional Information:


#2

Is there any link with the fact that I don’t have any pdf viewer extensions ?

I noticed a friend had an older version of Brave where a list of extensions were natively proposed.

Here is what I have on my side: Lastpass is the only extension I have
49

What my friend has:

It works on his side, but not on mine.


#3

Hi @SuperDupont,
Brave comes with a built in pdf viewer (PDFjs)but we’ve been having some issues surrounding it recently.



However, to workaround this until the issue is addressed, you can install a PDF viewer extension that will allow you to view pdfs in-browser. Not a super convenient answer but should alleviate the problem until we can resolve it on our end.

Hope this helps!


#4

I’m using MacOS High Sierra on my desk computer, my wife gets the same issue with the same version of Brave with MacOs Mojave.

I also tried to install 2 extensions from the Chrome store:

Does not solve the fact to view the pdf in the window. The PDF structure error is still there

It can’t even be installed, there is another bug:


Error says the element is being downloaded (in progress) and added to Chrome, which is not the case at all !!! I can just close the pop-up, no extension installed in the end.


#5

still not able to open pdf in Windows 10, Brave Version 0.56.15 Chromium: 70.0.3538.110 (Official Build) (64-bit)


#6

@jerrygoyal,
We’ve addressed several PDF issues but there are some that still remain. If you can provide a link the PDF you’re attempting to access as well as a more detailed description of your issue and/or a screenshot of the error you’re seeing we’d be happy to help find out what’s going on.


#7

The issue is still there, but only on sites where I’m looged in !!
If I have to access to a pdf on any “non connected” websites, there is no issue at all, the pdf is displayed.

If I’m logged in (bank, insurance…), I can’t acess directly to the pdf (the display is broken). The only solution is to download it.


#8

@SuperDupont, the above issue is captured here:


Looks like this is already fixed in Beta - should be hitting Release build shortly afterwards. So you shouldn’t be encountering it for much longer!


#9

I’m getting the same error when attempting to view a bill from my Electricity provider (Energy Australia). The “PDF.js v2.0.673 (build: 31012570) Message: Invalid PDF structure” error.

However, even right-clicking to Save As… on my computer downloads a version of the PDF that cannot be opened (macOS - Preview reports a problem with the PDF file).

Attempting same in Safari and it views and downloads okay.

I can’t post the PDF here for privacy reasons…


#10

we have the same error reading pdf inline,
and this is EXTREMALLY important, because at this moment Brave is usless as a browser,
and we are forced to switch to chrome.
Why the setting to force download PDF is NOT working?
Crutial bank pages via Brave are useless now, we cant get any PDF confirmations.
We set up the setting to dwonload PDF, but the setting is NOT working,
PDFa are still being tried to open inside browser (with error thrown:

Unexpected server response. Less Information Close

PDF.js v2.0.673 (build: 31012570)
Message: Unexpected server response (403) while retrieving PDF “https://start.ingbusiness.pl/ing2/json/operationExport/getConfirmation/1734879389”.

Blockquote


#11

" Settings

PDF documents

Download PDF files instead of automatically opening them in Brave" -

IT IS ON…


#12

same here… does anyone knows how to fix it?


#13

Sorry for the late response everyone.
This issue actually should have been addressed already in the issue I linked to above:

@axe88, @labora, @leobraveforum - Would you mind confirming your Brave version and OS for me? May have a regression on our hands.


#14

I have the same issue (Invalid PDF structure or corrupted file). Merrill Lynch says “Our tax documents are encrypted, and this browser faces issues with decrypting the document when opening it.”. They were speaking of Edge which has the same problem. IE11 works just fine. My version of Brave is (from about Brave - Brave is up to date Version 0.58.21 Chromium: 71.0.3578.98 (Official Build) (64-bit)).

Note: Merrill Lynch says it is a decryption issue. They do not provide a straight file download option.

I have only used brave for a few days and am generally happy. But this is a showstopper unless it is fixed soon.


#15

@LeoHamm,
The issue linked to above describes exactly that behavior. It is strange though, considering that issue should have been addressed a while back. I’m going to reach out to the team and see if they have any idea why it may be regressing.

I’ll return when I have more information. Thank you for your patience.


#16

You can cancel this issue. I will be uninstalling Brave because there are just too many incompatibilities with many sites.

Thanks any way.


#17

Brave is up to date
Version 0.60.47 Chromium: 72.0.3626.119 (Official Build) (64-bit)
Win 7

chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/https://myaccount.missionlinen.com/statement-view?dt=2%2F28%2F2019&command=showpdf

PDF.js v2.0.673 (build: 31012570)
Message: Invalid PDF structure

Unable to open a PDF on any site where I am logged in. I have looked at other questions and answers and it appears the issue was thought to have been fixed with an earlier version, but I continue to have the same problem.

Thanks in advance


#18

Can you tell me if you have PDF files set to download automatically or open in-browser when clicked?


#19

If there is somewhere to choose one or the other I am not aware of it. They always open in the browser.


#20

I’d like to test and see if you can at least download the PDF files to view them. Open the main menu, navigate to Settings --> Advanced --> Privacy and Security --> Content Settings --> PDF Documents - toggle this option “ON” if it isn’t already and try opening the link again.

Let me know the results.