brenden / node-webshot

Easy website screenshots in Node.js
2.12k stars 285 forks source link

Images are broken #121

Closed kucukkanat closed 9 years ago

kucukkanat commented 9 years ago

When I take a shot as pdf my images are broken and split into two pages, like 1/5 of the image remains in the previous page. What can I do not to break components in html while rendering as PDF?

I go like :

webshot(URL_To_Shoot,FilePath_To_Save,{
shotSize:{ width: 'all', height: 'all' },
paperSize:{format:'A4',orientation:'portrait'}
},function(err){
...
})
brenden commented 9 years ago

Can you post an example URL that shows the problem?

kucukkanat commented 9 years ago

screen shot 2015-10-19 at 08 16 30

Sometimes the comboboxes,texts or input fields are even broken into half

brenden commented 9 years ago

OK I see. Looks like this is an open issue in PhantomJS and it will have to be fixed there: https://github.com/ariya/phantomjs/issues/10551

You might be able to solve the problem in some cases by just modifying the page's stylesheet. This thread suggests a few approaches that could work: https://github.com/ariya/phantomjs/issues/10638