Is there a way with CF2023 natively to convert htm...
# adobe
d
Is there a way with CF2023 natively to convert html to an image? Currently we use wkhtmltoimage, but wondering if possible out of the box with cf2023
a
https://helpx.adobe.com/uk/coldfusion/using/whats-new.html Am sure Charlie has a bigger list, but on the whole it was a pretty much non-event of a release. Least interesting since perhaps CF8?
(and, no, nothing that will convert mark-up to an image)
d
For us we've been using lots of 3rd party libraries to generate pdfs and spreadsheets etc. The upgrades to do that natively for us have been a win. Except for the bugs... as per my next post.
a
It really surprises me that if you have it working with third-party libs you'd want to move back to baked-in CF stuff. Seems like a backwards (and risky) move in general, given how - as you say - buggy and poorly supported the add-ins to CF usually are.
d
The third party libraries are even more behind. And aren't being updated going forward. Apart from the bugs with cfhtmltopdf, it does render css flexbox / grid well and is faster.
I'll start ditching my 3rd party tables and start using cfgrid soon. lol
a
I do not believe that any decent (read: well-used) Java lib that does anything would not be as good as the bolt on stuff they throw at CF.
Oh yeah like if the stuff in CF does the trick... no reason to not use it. I just meant had I already taken the time to move away from it (for a given piece of functionality), I'd not move back.
d
So this library seems to be the best HTML to PDF library out there. https://wkhtmltopdf.org/, hasn't been updated for 4 years. And is using old school rendering engine. If anyone can suggest a better option, I'm all ears. We just want to write modern css/html and have it rendered to a pdf.
a
Mad.
(ie: that it's not been updated for so long)
d
I know right.
a
Well: I stand corrected in this case. And like I mean given CF is an Adobe product, one would expect it to be pretty bloody good @ PDF stuff. But I think for most of Adobe, CF doesn't count.
"ColdF... what? Oh that thing from Macromedia"
d
Totally. Well I think it's a positive step that they've upgraded their underlying libraries. Going forward I think that's a must.
a
Yup.
Hopefully there's been a proper shift in... um... "approach to keeping up with the industry" I guess.
d
Yep. I think they are.
d
I just went down this path and found https://gotenberg.dev/. It was super easy to get going (assuming you already run things in Docker) and you can create PDFs or images. Highly recommend.
d
We use playwright https://playwright.dev as a separate service (container in our case) you give it markup and it will render it using chrome (or browser of your choice) headlessly you can then return the result as an image / pdf etc. Allows you to actually use modern css etc.
d
I've added a feature request, add your votes if you'd find it useful: https://tracker.adobe.com/#/view/CF-4220503