Skip to content
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 file #2048

Closed
michelecafagna26 opened this issue Nov 8, 2018 · 10 comments
Closed

invalid or corrupted PDF file #2048

michelecafagna26 opened this issue Nov 8, 2018 · 10 comments

Comments

@michelecafagna26
Copy link

michelecafagna26 commented Nov 8, 2018

Description

Doesn't show pdf file, showing :

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

the same pdf is correctly opened in Mozzilla, Chrome and Edges

Actual result

pdferror

Brave version (brave://version info)

Version 0.55.22 Chromium: 70.0.3538.77 (Official Build) (64-bit)

Wibdows 10

@avndp
Copy link

avndp commented Nov 9, 2018

I'm facing the same issue.. I'm using Ubuntu 18.10

@cndouglas
Copy link
Contributor

Please update to the latest release version (0.56.12). The problem (#1287) has been fixed.

@michelecafagna26
Copy link
Author

michelecafagna26 commented Nov 11, 2018

Great! it works fine

@bbondy bbondy added the QA/No label Dec 2, 2018
@bbondy bbondy added this to the 0.56.x - Release milestone Dec 2, 2018
@gustavnikolaj
Copy link

This issue is still present in Version 0.61.51 Chromium: 73.0.3683.75 on macos. Let me know if you need further information.

The cookies seems to not be included on the request made for the pdf file, which ends up resulting in a redirect to a login page.

@LefterisJP
Copy link

I also see this issue with Version 0.65.120 Chromium: 75.0.3770.90 (Official Build) unknown (64-bit) even with all shields down.

@bsclifton
Copy link
Member

@LefterisJP do you have more information? (not sure if the site you are using requires a login). Would be great if we had some way to reproduce on our side

@LefterisJP
Copy link

Yep. So the site is actually mine. It does require a login and it's a django website (not live yet) so the test code is all local.

The url requires login access so cookies are involved.

The response is a pdf. In python code it's the following:

...
...
...
    with fs.open(internal_filename) as pdf:
        response = HttpResponse(pdf, content_type='application/pdf')
        response['Content-Disposition'] = f'attachment; filename="{external_filename}"'

    return response

Anything else I can do to help?

@bsclifton
Copy link
Member

bsclifton commented Jun 19, 2019

@LefterisJP nice! ok so the only thing I would ask would be: can you try Nightly? We removed PDF.js in favor of PDFium. If it works in Chrome/Chromium, it should now work for you 😄
https://brave.com/download-nightly/

This code will eventually make it's way into the release channel (currently, we're on 0.65.x and the fix was in 0.68.x) - estimated ship date August 20th
https://github.com/brave/brave-browser/wiki/Brave-Release-Schedule#release-channel-dates

@bsclifton bsclifton self-assigned this Jun 19, 2019
@bsclifton bsclifton added the needs-investigation A bug not 100% confirmed/fixed label Jun 19, 2019
@LefterisJP
Copy link

@bsclifton Done. Used latest AUR nightly package in Archlinux so that makes it 0.68.60-1.

There the problem is gone. Clicking on the URL downloads the pdf, just like in Chromium and then you can click on the download to see a preview which renders just fine. 👍

@bsclifton
Copy link
Member

@LefterisJP awesome! thank you so much for confirming 😄 Feel free to stick with Nightly or you can ride it out (and continue to use the more stable Release channel). Thanks again 😎

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

No branches or pull requests

8 participants