PDF inside iframe not showing in chrome
See original GitHub issueCurrent behavior
According to the comments made by @jennifer-shehane in #2835 , PDFs loaded within iframes used to work in chrome in the past, but they don’t now.
I’m using cypress 9.6 with chrome 100. This works fine if I instead choose edge (101) or firefox (98).
Desired behavior
No response
Test code to reproduce
Clone this example repo by @jennifer-shehane and do:
$ npm install
$ npm install cypress@9.6
$ npm run cypress:open
Select Chrome (I’m using v100) and run the test. You’ll see something like my screenshot above instead of seeing the PDF inside the iframe
.
Cypress Version
9.6
Other
No response
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Google chrome dose not show pdf in iframe - Stack Overflow
The solution for me was opening the PDF in Adobe Acrobat and under the "Protect" tab, select "Remove Hidden Information".
Read more >510800 - Issues with pdf viewer and iframe - chromium
PDF viewer is not showing the pdf in iframe or object tag. Works good on IE and FF since are using acrobat. Does...
Read more >4 Ways to Fix iFrame When it's Not Working in Chrome
1. Disable/enable iFrames from Internet Options · 2. Stop your antivirus service · 3. Disable all add-ons from your browser · 4. Download...
Read more >Cannot view PDF files inside an iframe on Chrome for Android
For anyone looking for more information on this topic, I never figured out a way to display the pdf in an iframe.
Read more >Why doesn't the PDF in the iframe display the same in all ...
Why doesn't the PDF in the iframe display the same in all supported browsers? · 1. In each browser, the built-in window with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same issue with Chrome Version 102.0.5005.115 (Official Build) (64-bit)
A few months ago using a Base64 PDF generated inline in an iframe as src via javascript on page, the Chrome PDF Viewer used to load. Now, it does not, just blank, with no errors in console or network tabs in developer tools.
Still works OK as expected in FireFox. I’m guessing this is a Chrome issue…
Using chrome v100 and this simple test, pdfs are not preview-able.
Requires testing.pdf file in project root.
index.html
spec.js
This appears at first glance to be an issue with cypress interfacing with chrome. This issue was not seen with: