

There are even some documents containing fonts where the text information has no actual relationship to the displayed glyphs, you might have encountered them before in these documents if you highlight and copy paste some text that appears 'normal' when you paste it to another application it's just nonsense. The text content included in a document mostly just defines where letters from a font should be drawn.

The presence of fonts in the file helps applications that display PDFs draw text in (almost) the same way across platforms. The fact it contains text and font information is almost, but not quite, incidental. This means whatever platform you view it on, it should look (more-or-less) identical, whether you're on Windows, Linux, Chrome, Android, etc. At a very high level it's a set of images defining how the pages in the document should appear. To those unfamiliar with it I'd describe a PDF file as a picture. It's a good question and the answer lies in trade-offs made when the PDF format was designed. The question anyone who has tried to extract text from a PDF using C# will have asked themselves at one point or another is: why is this so complicated?
