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

New webkit renders PDF itself #1052

Open
msdemlei opened this issue Jul 31, 2023 · 3 comments
Open

New webkit renders PDF itself #1052

msdemlei opened this issue Jul 31, 2023 · 3 comments

Comments

@msdemlei
Copy link
Contributor

Current Behavior:

When luakit "opens" a PDF, it (well: the embedded webkit) renders it itself rather than handing it over to viewpdf or just downloading it. That behaviour was introduced somewhere between webkit 2.34 and 2.40.

Desired Behavior:

Have a knob (in settings?) to turn off the webkit-internal PDF renderer (if you ask me: I'd make it default off).

How can we reproduce it (step by step):

Link against webkit2gtk 2.40.3 (as in Debian bookworm), follow a link to an application/pdf.

Environment:

Linux Distribution & Version: Debian bookworm
Output of luakit --version:
luakit 2.3.3
built with webkit 2.38.2 (installed version: 2.40.3)

[Hm... now that I read this... could this be trouble?]

@taobert
Copy link
Contributor

taobert commented Jul 31, 2023

[Hm... now that I read this... could this be trouble?]

No, i see the behaviour too with:

# luakit --version
luakit 2.3.3-40-g73ce8add
  built with: webkit 2.40.4 (installed version: 2.40.4)
                 GTK 3.24.38
                GLIB 2.76.4
                SOUP 3.2.2

@henkmet
Copy link

henkmet commented Aug 1, 2023

The good thing is that webkit now renders the pdf correctly whereas earlier it would be a sure crash (for me). But likewise, I find that I'm very often downloading the file to use my system viewer. A seting would be welcome.

@msdemlei
Copy link
Contributor Author

msdemlei commented Aug 1, 2023

I've dug a bit, and over at WebKit, there's even a PR tag for the whole calamity: https://github.com/WebKit/WebKit/pulls?page=2&q=is%3Apr+pdf+is%3Aclosed+label%3APDF, but there are quite a few more PRs that mention "PDF" on top. The one introducing pdfjs in the first place, however, I've not found yet (but then I was was too stingy to clone the whole tree, which looks like several gigabyte-ish).

There's an easy-to-find build-time setting to throw out pdfjs, but I certainly don't want to rebuild webkit (regularly); the code that decides to do some wild iframing for application/pdf, on the other hand, I have not found.

I've also experimented with blocking the webkit-pdfjs-viewer: URI scheme webkit uses internally from within luakit, but that (understandably) results in a white page when clicking a PDF.

So... I guess I'd rather ask around rather than keep on poking blindly. Does anyone know a good place to ask?

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

No branches or pull requests

3 participants