iOS 12 - 12.1.2 jailbreak is released for a while, I believe you must enjoy customizing your jailbroken devices so much. If your device is jailbroken, you could directly view and extract messages using 3uTools.
Step 1 Jailbreak your iDevice from Flash & JB → Jailbreak, and select the compatible iOS jailbreak for your iDevice.
Step 2 Launch Cydia, search “Apple File Conduit”in search bar. Tap into it and tap “Install”, then restart SpringBoard.
Step 3 Re-launch 3uTools, go to iDevice → Data → Messages, now you could view or back up messages directly.
Step 4 Click Backup →Back up into PDF Format.
That is it, you could open it with PDF as follow.