HTML file to Image?


#1

Hi,

I wonder if we have a way to turn simple HTML file into an image.
The first thought is, cffile read the HTML file and then use ImageNew function to turn the content from cffile read into the content of the image. However, it generated an error.
Java Stacktrace
lucee.runtime.exp.ExpressionException: file or directory

Do you have another simple way to accomplish it?

Thanks.


#2

Maybe turn it into a PDF and then convert that?

Mark Drew


#3

Thanks for the idea, Mark, googling produced this technique as well but I don’t have any PDF tool that would allow me to save a PDF as an image file. But no biggie, I’ve resolved it with another method.


#4

Lucee can’t do this directly, but you could use wkhtmltoimage as a seperate service.
Paul


#5

Thanks for the note, I’ve solved it.


#6

So how did you do it? Share for future people. Give back you know?

Mark Drew


#7

Firefox extension: screengrab! Calm down, man, some wants to know and some don’t.


#8

Gratitude! you are awesome, the community can’t wait to help you with your next boneheaded issue.


#9

@tonygray I now know the definition of a??hole.


#10

Self realization is an important part of the human journey.


#11