Possible Duplicate:
How to save webpage as a image file using PHP?
i want user to enter few inputs then when he is done click save
all his inputs are sent to a php file that save these inputs and responde with
a new printable page that have a background image,and all inputs are shown on list positioned by css.
my question is is it possible to ..
my small project is using:php-html5-jquery-codeigniter 2
You can generate a JPG of the page server-side using the GDI+ but it would require you placing text, etc, not relying on CSS, and a browser for layout... Failing that, you'd be better off generating a PDF which is designed for this.
As to printing, you can trigger the print dialogue using the following Javascript
windows.print()
window.print()
on load.To auto open the print dialogue:
function printpage() {
window.print();
}
Or just straight out call window.print();
You can either muck about with PDF generation, or you can set up print-friendly CSS.