0

i have HTML with inline style that using transform attribute of Css3.0. i want to convert into image. i am not using canvas and i already tried with html2canvas and other API's for capturing screenshot but its not working for me. i really tried too much for convert it to image. below are the URL of HTML. i want to convert it to image. please help me to solve this.

http://gurutechnolabs.co.in/websites/Corephp/strawberry/test.php

i have also tried with wkhtmlimage i get this output:test image

  • Please post you're code or JSfiddle. Not an external site.. – Alexis Oct 27 '15 at 11:52
  • I had this problem too. I've resolved with these [answers](http://stackoverflow.com/questions/9075792/save-export-image-file-from-html-content). – Jacopo Oct 27 '15 at 11:53

1 Answers1

0

There are two way I know and worked perfect for me,

User

wkhtmltoimage

It takes the HTML and convert it to image. It support all html5 and css3 properties. You can read more about it here http://www.catchstudio.com/labs/php-screenshots/

HTML2PDF utility and then imagick in php

The idea here is to convert HTML to PDF and then to image. First HTML2PDF will convert html to PDF and then Imagick which is an wrapper in php for imagemagick will convert it into desired format image. You can read more about it here http://buffernow.com/html-to-image-php-script/

Hope this helps to you!

Anand G
  • 3,130
  • 1
  • 22
  • 28
  • i already tried with html2pdf & imagemagick its not working. when image written in pdf then loose their transformations. and can you say me how to use wkhtmltoimage . i don't know how to install it & where to apply commands? – Tansukh Parmar Oct 27 '15 at 12:08
  • wkhtltoimage is an extension of wkhtmltopdf. The link I gave has the steps to install it. Try them once – Anand G Oct 27 '15 at 12:42