schomery / easy-screenshot

Easy Screenshot is an easy-to-use visual part, the entire page, or a selective screen capturing tool.
https://webextension.org/listing/screenshot.html
Mozilla Public License 2.0
24 stars 14 forks source link

Full page screenshot does not work properly when a page has non-scrolling elements #7

Open Gitoffthelawn opened 7 years ago

Gitoffthelawn commented 7 years ago

In particular, fixed position elements, including non-scrolling headers and footers.

Can you fix it?

schomery commented 7 years ago

As far as I know there is no way to fix this. Basically, the chrome API only allows to capture visible area and hence we need to scroll to the invisible areas and take different screenshots and finally merge them all. So these absolutely positioned elements are going to be visible in all frames and hence multiple times in the final image.

If you have seen another add-on that does this type of capturing correctly I can take a look. Note that my SDK add-on on AMO does this but it uses SDK module which is not available in Chrome and WebExtension platform

Gitoffthelawn commented 7 years ago

Yes, this WebExtension seems to work: https://addons.mozilla.org/firefox/addon/pagesaver-we/

schomery commented 7 years ago

Check both extensions on http://learnlayout.com/position.html

Gitoffthelawn commented 7 years ago

Good find (and nice site). I think the other extension also fails on that page because it's not a header or footer that has a fixed position; it's more of a fixed position popup.

I'm suppose the best way to capture that page is to just capture the fixed position item at the end of the page.

schomery commented 7 years ago

I've modified the latest version so it is a bit smarter. If there is a sample page that the other extension can detect and this one doesn't please share the link.

Wait for the new version to get reviewed.

Gitoffthelawn commented 7 years ago

Hi Jeremy. I found this extension that might be helpful to you: https://addons.mozilla.org/firefox/addon/unstickall/

Basically, it removes all fixed elements.

For screenshots, I don't think you want anything that extreme, but converting all fixed/sticky position elements to relative/static (or possibly even absolute) might be a great addition. You could even create an experimental bookmarklet to play around with the idea.