hoehrmann / CutyCapt

A Qt WebKit Web Page Rendering Capture Utility
http://cutycapt.sourceforge.net/
99 stars 49 forks source link

only render a clipping rectangle #1

Open oberhamsi opened 11 years ago

oberhamsi commented 11 years ago

instead of rendering the whole viewport, CutyCapt could accept an argument `--clipping-rect=x,y,w,h

should work something like this:

  clipRect = QRect(left, top, w, h);
  painter.translate(-clipRect.left(), -clipRect.top());
  mainFrame->render(&painter, QRegion(frameRect));

(what I actually would love is something i have seen in phantomjs: the ability to pass a dom selector to CutyCapt so that it only outputs the rendering for the first element matching that selector, but I understand this would be harder to too and the above clippingrect solution would already help me a lot.)

uppalasx commented 10 years ago

Its great.. I have faced issue on windows7 machine Could you please help me on this. I have installed QT 5.1.0(mingw48_32) in my windows7 machine and able to create the CutyCapt.exe file using below commands. But the generated CutyCapt.exe file not able to rendering my .html page. It is giving the white page. Note : My html page have the js code+ html content.

But I have downloaded the CutyCapt.exe file from "http://cutycapt.sourceforge.net/" . The downloaded CutyCapt.exe file able rendering my html file.

I have used the same source code and same html I have used. Any of the one please help me, how I can generate the exe file. If there any other process is there in windows machine please let me know.

I have used below commands for generate the CutyCapt.exe : qmake -project qmake mingw32-make