If I were making a PDF successor, this would be one of the top problems to fix. At least make text selection work properly! And simplify the format a little, would you please? To get any sort of compatibility with my PDF processing program I had to write it as a custom rendering backend for the Poppler PDF engine. It should not be this hard.
Thus I don't really understand where the problem with format itself is? If you have suggestions regarding features needed, take a part in ISO comittee.
Also, the codes used to represent letters refer to fonts not to unicode code points (or other character sets for that matter). So my problem is that extracting text from PDF has to use a heuristic approach that always fails at some point. That's why copy and paste out of PDF documents leads to such strange results sometimes.
The use case I'm talking about is to distribute documents for viewing, printing AND further processing.
The issues I have with the PDF format are not solvable by adding features because the features are already there. PDF documents can contain unicode text and a very large number of other structural information as you have pointed out. I know because I have written PDF software and I have read the spec very carefully top to bottom.
There are two major problems:
* The PDF format is incredibly bloated, difficult to process, and it allows documents to be distributed without deterministically extractable text. (And I don't mean the case where the author deliberately restricts text extraction)
* The widely used tools to create PDF files, by default, do not use the PDF features that would allow deterministic text extraction.
The PDF format is older than the web. Data integration and search were not important tasks when PDF was created in 1992. It was meant for printing and viewing only.
The only way to solve these problems would be to remove features from the PDF spec or to mandate the use of other features. Both would be incompatible with previous versions in a way that is completely unacceptable. That's why I think there has to be a new much simpler format that leaves all the old arcane baggage behind and facilitates reliable processing in addition to viewing and printing.
I had heard something that the main reason for creating PDF was that you couldn't render a single PS page without rendering all the ones preceding it.
So I suspect there were other reasons as well for removing so many features. Maybe the complexity of interpreters. I don't know.