Start Free Trial
Come for the solution, stay for everything else.
Start Free Trial
Convert HTML to Image
How can I convert HTML source to image (Run-Time on Server) by PHP language ?
8/22/2022 - Mon
Converting HTML to an image implies rendering the HTML, a task which is usually done on the client side by the browser. Unless you find a way to encapsulate Mozilla into a php class, I don't think this can be done.
What do you need?
It has non sense to convert to image something that is normally done by a browser...
Let me know
This can be done but you'd most likely need your own server dedicated for it..
PHP can run commands in the command line..
so you can make a script that would take the input of a form which would tell it what page to use and which browser to open it under.
the php script would launch the browser with that page through command line, then call the screenshot utility and save it to a path accessible to the server and return a path.
There are other things out there such as
to do so.
I don't think making one from scratch would be too hard. You just have to find a screenshot utility which you can run from command line and time it a certain amount of time after the launch of the browser.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
ASKER CERTIFIED SOLUTION
Log in or sign up to see answer
Become an EE member today
7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Sathallrin: "You cannot do this entirely with PHP, you would have to setup some programs on the server using one of these packages"
It's better to be sparing for setup some programs on the web server using one of these packages. No more any other solution ???
Plans and Pricing
Certified Expert Program
© 1996-2022 Experts Exchange, LLC. All rights reserved. Covered by US Patent