ukwa / ukwa-pywb

GNU General Public License v3.0
11 stars 3 forks source link

Can't see iframe contents when printing #93

Closed anjackson closed 2 years ago

anjackson commented 2 years ago

This applies to ePub access, but also to all web content - if you try to print, the outer frame prints, and takes up the whole page. The iframe content is not visible.

It may make more sense to intercept/offer to print just the iframe? Seems like this is a bit messy/subtle?

ikreymer commented 2 years ago

Yeah, I think probably should try to offer to print just the iframe.. This seems like a browser issue, I could'get any page with an iframe (ex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe) to show up correctly in the print preview or print to PDF. Supposedly this was fixed recently: https://bugs.chromium.org/p/chromium/issues/detail?id=1303840 but am still seeing issues in latest Chrome, and similar results in Firefox.

ikreymer commented 2 years ago

Well, turns out that removing the

wrapper around the iframe makes printing mostly work, in both Chrome and Firefox! It seems to work for most generic pages, and epub viewer, though not quite for pdf viewer (presumably its doing something custom). But, the pdf viewer does have its own print button so hopefully that is sufficient?

anjackson commented 2 years ago

Grand, thanks.