Copy text from pdf in textfield


#1

There is a issue, I don’t know if it is kirby related, when you copy text from a PDF in a textfield firefox will show a blanc after german Umlaute.

lorem ipsum ü ber enim mö gen ...

My customer always do it, even though I told them, not to do it?!
Is there a workaround?!


#2

Strange issue and probably hard to reproduce? Could you reproduce the issue yourself? What browser version? What OS? What Kirby version? Does this happen in another browser as well? What sort of PDF created by what sort of program? Maybe the PDF contains hidden characters.


#3

Now, I cant reproduce the issue, neither in mac os preview or in acrobat or in PDFs from indesign. But I have had the same issue sometimes. Since then I never copy text from PDF. It’s not a good idea anyhow. I tell my customer not to deliver PDF’s. But I will ask my last customer who have that problem.

The problem only occurs in Firefox and Firefox related Browser like Cliqz.


#4

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.


#5

This is nothing Kirby can fix, I think. I’d suggest your clients use another browser if they insist on copying from PDF and can live with the other issues caused by copying from PDF. It’s not a good idea to copy from Word, either, by the way. It often introduces hidden chars that can completely mess up the layout.


#6

Thanks for the hint,
I’ll continue telling my clients not to copy text from pdf or word :slight_smile: or at least using a textfixer tool.


#7

The pdf was created by indesign CS3 on Mac OS 10.3 copied from “preview”. With CS6 on mac 10.11.6 I can’t reproduce the issue.

But I think it’s better practice not copy formatted text anyway.


#8

I can totally understand that people don’t want to manually type everything in if the content is already there. But then they have to take precautions and live with the fact that this can cause issues. In your client’s case, they can probably use a different browser to work around this issue.

I’ll close this topic because there’s nothing we can do about it.


#9

You are definitely right. For a propper understanding:
It’s not copying text in the backend via Firefox Browsers. It’s only Firefox who diplays the blancs in the frontend view, Chrome, Safarie, Opera etc. dont show blancs. I guess I did not express myself well.


#10

Oh, I see. Then switching browsers doesn’t help, of course.