如何将html转换为相同质量的jpg [重复]

This question already has an answer here:

I have a card that is made by HTML and some data comes from the database by query now I have to convert that particular div into png or jpg with good and same quality like HTML. html to canvas is not the good option for that.

As Image quality is blur

</div>

you can use pdfcrowd API library for it. https://pdfcrowd.com/doc/api/html-to-image/php/

or you can do it with Html to Jpeg with Php and html2canvas

https://github.com/erayakartuna/html-to-jpeg-php

Thanks