11 ms·
Tldr, text can be encoded as plaintext, image or binary.
by person_of_color 6y ago
Tldr, text can be encoded as plaintext, image or binary.
- mr-ron 6y agoMuch 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
- ComputerGuru 6y agoNot 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.
- vivekseth 6y agoThere’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.
- person_of_color 6y agoThe best method is probably to render the PDF and use OCR.
- liability 6y agoUnfortunately that's obnoxiously inefficient if you're trying to run it through text-to-speech in real time.