HTML file to Image?

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.

Maybe turn it into a PDF and then convert that?

Mark Drew

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.

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

1 Like

Thanks for the note, I’ve solved it.

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

Mark Drew

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

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

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

Self realization is an important part of the human journey.

1 Like