niche Posted September 27, 2012 Share Posted September 27, 2012 (edited) I've been all over the manual (especially the Image Processing and Generation section) and googled this issue and haven't found an example or function to convert any html file into a jpg or png. Please confirm if you know that no such example exists. If not please provide a link for a source/reference you can recommend. It would be a plus if this is possible with an existing example or function, but not the end of the world if such an example or function doesn't exist. I'll just put it on my to do list. Edited September 27, 2012 by niche Link to comment Share on other sites More sharing options...
Ingolme Posted September 27, 2012 Share Posted September 27, 2012 You would have to build an entire browser engine in order to read, interpret and render the HTML document. There isn't a simple function that will do that for you. 1 Link to comment Share on other sites More sharing options...
niche Posted September 27, 2012 Author Share Posted September 27, 2012 I spent a few hours on this and thanks to your answer I can sleep well knowing I did what I could. I am surprised that capability doesn't exist.Thanks Ingolme. Link to comment Share on other sites More sharing options...
birbal Posted September 27, 2012 Share Posted September 27, 2012 it is possible to load a site in "canvas" and send its pixels to php. when you get the pixels you can use php gd function to construct a file and save it. https://developer.mozilla.org/en-US/docs/HTML/Canvas/Drawing_DOM_objects_into_a_canvas 1 Link to comment Share on other sites More sharing options...
niche Posted September 27, 2012 Author Share Posted September 27, 2012 Thanks, as always birbal. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now