What I’m trying to do is : extract pages one by one from a pdf Document and create an url using blob to put it in the src parameter of my Iframe. It works perfectly until I use Chrome DevTool to see if the iframe displays correctly on other devices. Everytime I load the iframe, I get “Page layout may be unexpected due to Quirks Mode” as an issue in the browser.
I did some research to fix this. First, the error “Quirks Mode” means I have to write at the beginning of my file. The problem is: I use Next.js, so it’s supposed to be automatically fixed. Indeed, the iframe displays the document correctly on other devices if I use the original url that contains the entire pdf document. So I figured that the problem would be the url and not the iframe, but the blob url (page by page) works without using Chrome DevTool(normal desktop dimension) so I’m stuck in this vicious circle. I also tried to comment every scss effect on my React component and it still does the error so it isn’t a css error. I’m pretty sure the problem comes from building the document within the iframe using the url, but I’m probably wrong because I can’t fix this error.
DrPickle is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.