Exporting big amounts of messages is extremely costly in memory and can cause the computer to struggle.
As a workaround we'd like to suggest breaking the whole bunch into smaller batches, and to do so:
- Select all threads on the left where you see the contact names
- From the top of the messages thread select the first and hold Shift on your keyboard
- Scroll down (maybe 1/4 of the whole list of messages) and while holding Shift click to finish you selection
- Choose "Export to PDF"
Narrow down the selection if the computer still struggles, and repeat the operation as many times as desired, resuming from where the selection was left off.