In my experience, the solution you are already using is one of the best out there, for sure in the free and on prem realm. What Iâve found is that thereâs a number of steps you can take prior to feeding a page to wkhtmltopdf to make exports look consistently nice. This is especially true if your tables come from a single app and can be tweaked with the same logic to ensure t render well. Even in the realm of commercial solutions, consistency is difficult when HTML markup can vary by miles. So what you have a typical challenge where 10% of the work gives you 90% of what you want, and the remaining 90% of the work is going to help you get closer (but not quite) to 100%.
If there was a way to use more logic outside the table markup, this would be a good thing, as you may be using your table as a source of other markup as well.