PDFs suddenly opening in TextEdit
For some reason some of the PDFs that I had stored on my laptop are now opening as TextEdit files, and are consequently just a jumble of code. I have no idea why this happened, i.e. what caused this change. I've tried right click to open with Preview, but it doesn't even give me that option. The latest one I tried to open is from two months ago, so it's not like these are ancient files. I have a 2020 MacBook Pro bought in 2022 and am running Sonoma 14.2.1. Can anyone help?
MacBook Pro 13″, macOS 12.4