Saving a ChatGPT chat as PDF without broken formatting

I was looking for a simple way to do this for a friend who wants to keep some of his ChatGPT conversations as PDFs. The main problem seems to be tables and code getting messed up when printing. A proper “Export as PDF” option from ChatGPT would definitely make this much easier.