php - Programatically create image from web-page or a single DIV -


is there way programatically create (client or server side (php)) image specific div or complete (web) page? i'm creating web-site free coupons , idea when end-user clicks on "print" button, app opens new tab/window selected coupons single image (jpg, png or etc..) in a4 format ready printing. each coupons has it's own data (article name, price, description etc..) need done programmaticaly on coupon-template designed.

i not ask write code me, suggest solution use/develop. if not exist, upload/publish free :)

update: did php gd library :) still not satisfied idea use images instead of pdf, because each printing results different coupon sizes (images) on different pc's. that's why pdf may better solution. can see/test on demo.svikuponi.ba - select few coupons , click printaj button above.

you cannot create image div sure yes can create dynamic images in php using gd library. following links help:

http://php.net/manual/en/function.imagecreate.php

http://phptutorial.info/learn/create_images/


Comments