Reference forconverting html into to jpg with php?

Do you have a reference for converting html into a jpg? If so please post it.

Google is your friend php convert html to image

Thanks. You gave me what I requested.

Please confirm, if you can, that php does not have a function that converts a saved html file into a jpg, or png. If not, and you know of such a function, what is it?

There is no such function. It would first require a GUI (Graphical User Interface) which can be manipulated, a browser that can also be manipulated, a series of functions that would then take a screenshot of a predefined area…and so on. This is not something you just do.

I his to create a saved html file

ob_start();

			include 'display_print_bop.php';
			
			file_put_contents('yourpage.html', ob_get_contents());

Surely, there’s a relatively easy way to convert it to a jpg or png with php?

No.

I can’t really say it better than @logic_earth ;, so I quote:

In essence you are asking PHP to do something it has no need of doing. Searching will show you solutions in other languages, ruby, bash, coldfusion. You can try and take those techniques and make them in PHP, but you will have your work cut out for you.