Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to take screenshot of overflow element ? #199

Closed
hiravebapu opened this issue Apr 27, 2013 · 3 comments
Closed

How to take screenshot of overflow element ? #199

hiravebapu opened this issue Apr 27, 2013 · 3 comments
Labels

Comments

@hiravebapu
Copy link

OR is it possible to pass an URL of page and take screenshot of whole page ? How are you doing it on Test Console ?

@niklasvh
Copy link
Owner

The test console loads the contents of the url using a proxy, creates an iframe document, puts the html there and then renders the iframe. The actual iframe is hidden from the user through the whole time, but it is necessary so that the DOM is generated for the content.

@usmonster
Copy link
Contributor

@engblh do you still have this issue with the current version in master? If not this can be closed. Even if so, this can still probably be closed as a duplicate of #60.

@nishantgupta11
Copy link

-> Add CSS overflow-y: scroll; to HTML element pdfHTML
-> Add attribute width & windowWidth to html2canvas method, which should be equal to width of pdfHTML Div

html2canvas(document.querySelector(".pdfHTML"), {
    width: 1350, windowWidth: 1350
}).then(canvas => {
    base64stringpdf = canvas.toDataURL("image/jpeg");
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants