I didn't mean pasting into the PDF but copying parts of a PDF in order to paste them elsewhere. This is not deterministically possible because (most) PDF documents do not contain a sequence of letters or words but rather a sequence of painting instructions, which can be different from the order in which the document is read.
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.