How can I convert a CSS3 or CSS2-based HTML page into a JPEG or PNG (with transparent background) image?
Is there any command-line tool or php-based API that can be installed on my Linux server and provide me with the best result possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try using http://code.google.com/p/wkhtmltopdf/. Check downloads sections, there is a
wkhtmltoimagepackage.It uses WebKit rendering engine, so your certificate should only look good in Safari/Chrome.
P.S.
Python with Qt4.4 required, but luckily most Linux boxes have python (and probably Qt as well, at least mine does)
Example of running
./wkhtmltoimage-i386 --crop-h 450 http://stackoverflow.com/questions/11096068/how-to-convert-css3-based-html-to-image/11096920#11096920 output.png