vbauer / manet

Website screenshot service powered by Node.js, SlimerJS and PhantomJS
MIT License
575 stars 102 forks source link

Parameter "height" does not work when given in the URL #64

Closed svetlyak40wt closed 5 years ago

svetlyak40wt commented 8 years ago

Here is an example, for url https://manet.herokuapp.com/?url=https%3A%2F%2Fallmychanges.com%2Fp%2Fjavascript%2Fmanet%2F&width=400&height=800, we have this image:

svetlyak40wt commented 8 years ago

Sorry for the lengthy description :(

ggdouglas commented 7 years ago

I also ran into this issue while evaluating Manet. While the width parameter appears to work fine, the height parameter has no effect on the captured height of pages. This results in long loads for capturing tall pages.

Example: https://manet.herokuapp.com/?url=https://en.wikipedia.org/wiki/HTTPS&width=800&height=600

In fact, for very tall/long websites it seems that Manet is unable to render a screenshot for the page.

Take this very long wikipedia article for instance: https://en.wikipedia.org/wiki/List_of_all_National_Historic_Landmarks

https://manet.herokuapp.com/?url=https://en.wikipedia.org/wiki/List_of_all_National_Historic_Landmarks&width=800&height=600

This fails with an error on the heroku demo app: { error: "Error while sending data file: ENOENT: no such file or directory, stat '/tmp/f65e90313598c3883a14155d375cf477a6f608b4.jpg'" }

The suggestion to in #19 to use clipRect doesn't seem entirely accurate since it crops a portion of the viewport rather than responsively sizing the webpage to those dimensions:

https://manet.herokuapp.com/?url=https://en.wikipedia.org/wiki/List_of_all_National_Historic_Landmarks&clipRect=0,0,800,600

vbauer commented 7 years ago

@svetlyak40wt I think it is known problem with PhantomJs... Could you please try to switch on SlimerJS engine?

svetlyak40wt commented 5 years ago

Closing this old issue. Thanks to https://12forks.com MVP for pointing to it.