Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Hidden Element Rendering #107

Closed
danaja opened this Issue Jun 20, 2012 · 3 comments

Comments

Projects
None yet
4 participants

danaja commented Jun 20, 2012

Hi,

Is it possible to use html2canvas for getting a hidden element on a page on to a canvas? I haven't gone through much of the code yet but just commenting the logic that skips hidden elements doesn't seem to work

Owner

niklasvh commented Jun 20, 2012

If you are referring to an element with display:none, then no. That's because even if you would comment the ignoring steps, the element itself is 0px wide and 0px high, meaning there won't be anything to render. If you are referring to visibility:hidden, then commenting out the correct lines should make it renderable.

Another easy solution is to set it visible, parse the page, and then hide it again. Obviously this will most likely end up the page flickering to the user.

@niklasvh niklasvh closed this Jan 3, 2013

mrded commented May 4, 2017

What if I want to take a screenshot of really tall page? So far I managed to only take a screenshot of visible part.

Hi @mrded, offscreen rendering is a known issue that I have tried to resolve in my pull request #1083. It hasn't been merged in yet, but if you want to try it out you can grab my latest build here, which has that and a few other features/bugfixes merged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment