PDF is indeed complicated, but extracting text can be as simple as a (simple) regular expression. As far as I understand, basically, everything between parentheses "(" and ")" is text (or more rigorously, everything between parentheses between the strings "BT" and "ET" between the strings "obj" and "endobj" is text, but I think it's enough to search for only the parantheses). The escape character is the backslash, and it has only a couple uses:
Sequence | Meaning
---------------------------------------------
\n | LINE FEED (0Ah) (LF)
\r | CARRIAGE RETURN (0Dh) (CR)
\t | HORIZONTAL TAB (09h) (HT)
\b | BACKSPACE (08h) (BS)
\f | FORM FEED (FF)
\( | LEFT PARENTHESIS (28h)
\) | RIGHT PARENTHESIS (29h)
\\ | REVERSE SOLIDUS (5Ch) (Backslash)
\ddd | Character code ddd (octal)
Apart from security settings that may block text extraction, unfortunately, there could be compression applied - but I don't know how that works.
András