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

Problem if page is longer than 8192px #59

Open
richtrefz opened this issue Oct 21, 2020 · 5 comments
Open

Problem if page is longer than 8192px #59

richtrefz opened this issue Oct 21, 2020 · 5 comments

Comments

@richtrefz
Copy link

If the rendered website page is longer than 8192 px, the .png file is nor right. At 8192 px down, the top of the web page repeats

attachment is a very shrunken capture of https://api.jquery.com/
but you can see the repeated header

jq

@brandon93s
Copy link
Contributor

Apologies for the thread-bump but confirming this behavior on all sites. As well, across both Linux and Windows.
I hope to investigate the root cause soon.

image

@ghost
Copy link

ghost commented Nov 3, 2020

Using puppeteer only gives the same results:

	const browser = await puppeteer.launch();
	const page = await browser.newPage();
	await page.goto('https://api.jquery.com/');
	const screenshot = await page.screenshot({
		fullPage: true
	});

	require('fs').writeFileSync('test.png', screenshot);
	await page.close();

Edit: if you really need this to work you can install puppeteer with Firefox, it works correctly with it: https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#puppeteerproduct

@brandon93s
Copy link
Contributor

Appears to be a Chromium issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1043959&q=screenshot%20fullPage&can=2. The only reliable workaround I've seen is to take a bunch of partial screenshots as you scroll and then stitch them back together.

@tthsympa
Copy link

tthsympa commented Nov 17, 2020

Hi @krnik, did you actually succeed using firefox along capture-website? If yes, i'm curious about how you do that. When I try, I always hit this error puppeteer/puppeteer#6323

@ghost
Copy link

ghost commented Nov 17, 2020

Yes, it did succeed. But I used only one option fullPage as in the example above. Maybe that's the problem here.

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

No branches or pull requests

3 participants