There are even more problems with copying over text from pdf’s.
E.g. the line breaks are also being copied which messes up the
kirbytext() output. I’ve send my clients to bypass this by using the Textfixer tool.
Another issue is that when the pdf is using a font that supports glyphs which aren’t in the font of the website, the character gets stripped out. That’s basically impossible to “fix”.
If there’s really much text to be copied from a pdf, I’ld suggest looking at the acrobat export to text feature, but it’s no silver lining neither.