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

[Bug]: PDF Preview is not working on webkit #31430

Open
Ransely-Nigrel opened this issue Jun 25, 2024 · 6 comments
Open

[Bug]: PDF Preview is not working on webkit #31430

Ransely-Nigrel opened this issue Jun 25, 2024 · 6 comments

Comments

@Ransely-Nigrel
Copy link

Version

1.42.1

Steps to reproduce

Run any Test case which requires PDF preview and content validation for webkit browser

Expected behavior

PDF should be preview on clicking on it

Actual behavior

PDF is not previewed and blank PDF is displayed for webkit browser

Additional context

It worked with firefox with below launch options

name: 'firefox',
use: {
...devices['Desktop Firefox'],
storageState: 'tests/.auth/user.json',
launchOptions: {
firefoxUserPrefs: {
"pdfjs.disabled": false,
}
}
},
dependencies: ['setup']

Environment

System
OS: Windows 11
Node: version 16
@pavelfeldman
Copy link
Member

PDF preview is not a part of WebContent, rather a Safari plugin. It is outside of scope for Playwright testing.

@fujii
Copy link

fujii commented Jun 27, 2024

I don't know what ENABLE_PDFJS is. But, GTK and WPE ports enable it.
https://github.com/WebKit/WebKit/blob/3fcd2236523c0c65609407eed1ff48fd0f7e12b9/Source/cmake/OptionsGTK.cmake#L93

@pavelfeldman
Copy link
Member

I don't know what ENABLE_PDFJS is. But, GTK and WPE ports enable it.

There isn't much we can test / validate about the pdf viewer.

@mxschmitt
Copy link
Member

I think we'd much rather prefer that pdfs trigger downloads, like WK/FF are already doing as per #7822.

@Ransely-Nigrel
Copy link
Author

Ransely-Nigrel commented Jun 28, 2024

I don't know what ENABLE_PDFJS is. But, GTK and WPE ports enable it. https://github.com/WebKit/WebKit/blob/3fcd2236523c0c65609407eed1ff48fd0f7e12b9/Source/cmake/OptionsGTK.cmake#L93

How can we add it in the config for enabling in webkit , like we have done for forefox above ?

@pavelfeldman
Copy link
Member

How can we add it in the config for enabling in webkit , like we have done for forefox above ?

There is no such config in Playwright.

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

4 participants