Restrict download based on file size

11 views
Skip to first unread message

Anuj Bhatia

unread,
Jul 13, 2015, 8:03:22 AM7/13/15
to phan...@googlegroups.com
Hello,

I use phantomjs to render HTML pages to PDF files based on a script similar to the included examples/rasterize.js.

I've come across a situation where a web page I need to render is being served by a buggy server script that sometimes seems to go into an infinite loop and it keeps serving the same block of HTML repeatedly at the end of the page. 

Is there any way that I can configure phantomjs to truncate the HTML download after say 5 MB? 

Thanks
Anuj
Reply all
Reply to author
Forward
0 new messages