In your case, I would try to transfer html to text and then convert to PDF. However, if you are working in an automated way, the best thing is that you resort to developing software for that task and let it work automatically.