If you have a Mac, and if you've got Messages on it linked to your iPhone/iPad, then you can print conversations. One of the options in the Print dialog is to save as a PDF.
Caveats:
Only works with messages since you've linked the computer and device. It won't pull history from the iPad.
Only works with SMS if you've linked with an iPhone on iOS 8 and OS X Yosemite.
iMessages works with just an iPad, as long as the computer and iPad have the same iCloud account and iMessages turned on both devices.
It's PDF, which isn't small or ideal for searching, but it does preserve small versions of any images, and emoji.
Side Note: PDF files become reasonably searchable if they are stored in Evernote with a Premium account.