Git Maxd
Git Maxd5mo ago

Limit Screenshot Size?

Using the v1/screenshot endpoint, is there any way to limit the maximum height of the screenshot?
For example, I want to capture only the top 4,000 pixels of a URL and not the entire page from top to bottom?
Solution:
Hi @GitMaxd, did you tried setting the height option? https://pptr.dev/api/puppeteer.pdfoptions.
Jump to solution
3 Replies
Solution
Gaurav Chadha
Gaurav Chadha5mo ago
Hi @GitMaxd, did you tried setting the height option? https://pptr.dev/api/puppeteer.pdfoptions.
Git Maxd
Git Maxd5mo ago
I ended up doing the screenshot on the server and uploading the base64 to public url.
Went on a tangent with Puppeteer. But I’m sure that would have worked.
Gaurav Chadha
Gaurav Chadha5mo ago
Cool.