There’s a little more nuance than that. Even if text is drawn using plaintext data there’s no guarantee that the characters/words appear in the correct order or have the proper white space between them.
The best method is probably to render the PDF and use OCR.
Unfortunately that's obnoxiously inefficient if you're trying to run it through text-to-speech in real time.
Much more than that. Even as text the difference of characters in the file and different types of line breaks makes the whole thing very tedious and error pront
Not just like breaks. I’ve seen PDFs where each letter in a word is it’s own object and I’ve seen PDFs where the object includes a hundred letters but only one of them is visible or not otherwise occluded.