Answer the question
In order to leave comments, you need to log in
How to convert text with source code to image in PHP?
Hello everyone
I want to convert source code from articles to images for SEO, but I can't find suitable solutions.
JavaScript source, the output must be an image in any format.
Does anyone know a PHP library?
As far as I understand, there should be a source to token converter plus drawing on the image, that's all, however, apparently, there are no such libraries.
Answer the question
In order to leave comments, you need to log in
https://www.php.net/manual/en/function.highlight-s...
There is this for highlighting, then html to img, done :)
If you go through ready-made solutions and spend 5 minutes on Google, then...
1. HTML to PDF:
https://habr.com/ru/post/190364/
2. PDF to Image File:
https://stackoverflow.com /questions/3833125/how-to...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question