0

I'm wondering if there are any existing (ideally well documented) PHP or Javascript/jQuery libraries/plugins or tutorials for creating an image from a page. An example of this in existance is Zurb's BounceApp.

This probably isn't something that's oft used, however I'd love to incorporate this into a personal project of mine.

In my particular use case, I would have the CSS and HTML which would dictate the "image" available locally, so there would be no need to get the HTML mark-up of another page, then find it's CSS styles.

Any advice or pointers towards a helpful tutorial or plugin/extension would be very, very, very appreciated :).

Avicinnian
  • 1,822
  • 5
  • 37
  • 55
  • 2
    Did you know about [`html2canvas`](http://html2canvas.hertzen.com/)? – Rob W Feb 18 '12 at 18:19
  • 1
    http://stackoverflow.com/questions/757675/website-screenshots-using-php – Mike B Feb 18 '12 at 18:22
  • There is a trick before `canvas`. Load the url in an iframe and put the iframe behind a transparent image with absolute position and lower `z-index`. – Shiplu Mokaddim Feb 18 '12 at 18:30
  • Props for the links guys. I should've thought of the word "screenshot", I'll check out the other question and html2canvas now. – Avicinnian Feb 18 '12 at 18:34

1 Answers1

0

You should check html2canvas, it the newest solution for your needs.

You should check this implementation: http://hertzen.com/experiments/jsfeedback/

To crop the image, you can use JCrop and send the info to a PHP script, to resize / crop the image the way you want.

Hope that helps!

Guilherme Viebig
  • 6,901
  • 3
  • 28
  • 30