How do I export my iPhone Messages to a PDF file?
Phoneview will retrieve your messages and export them to PDF, XML, or text.  (It also does a lot more, pulling files off your phone, letting you dig into application storage, archiving voice mail, etc.)

They offer a 7-day trial to see if it will work for you.

I'm not aware of any way to do this with the stock software.