Bug 329144 - Extra spaces inserted in text selection
Summary: Extra spaces inserted in text selection
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 0.18.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-23 03:53 UTC by Dario Bertero
Modified: 2013-12-29 15:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Example (21.96 KB, application/x-pdf)
2013-12-24 03:26 UTC, Dario Bertero
Details
Copy and paste of the example document (1.72 KB, application/octet-stream)
2013-12-29 08:06 UTC, Dario Bertero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dario Bertero 2013-12-23 03:53:09 UTC
Copying and pasting text selected from a pdf file, extra spaces are inserted randomly between the characters (but in the same places every time). This happened in all the attempts made so far with version 0.17.4 in Arch linux.

Reproducible: Always

Steps to Reproduce:
1. Open whatever pdf file
2. Select some text
3. Copy and paste the selection to any place
Actual Results:  
Text pasted contains extra spaces in random position (the same every time selecting the same string).

Expected Results:  
Paste the text as it appears in the document.

No output of any kind to the terminal.
Comment 1 Albert Astals Cid 2013-12-23 12:44:01 UTC
Can you please attach such file?
Comment 2 Dario Bertero 2013-12-24 03:26:19 UTC
Created attachment 84258 [details]
Example

It happens with all the files I've tried so far, I have attached an example.
Comment 3 Albert Astals Cid 2013-12-24 14:00:22 UTC
Can you please specify which text are you copying in which page and what output you get?
Comment 4 Dario Bertero 2013-12-24 14:22:03 UTC
If for example I copy the string "VI INTIMO" of the example provided (it happens for whatever text selection in all the pdf documents), and paste it on this same textbox, I obtain:
V I IN TI MO
Comment 5 Yuri Chornoivan 2013-12-24 17:35:36 UTC
Works fine here with poppler 0.24.2 and 0.25. What poppler version are you using(In reply to comment #4)
> If for example I copy the string "VI INTIMO" of the example provided (it
> happens for whatever text selection in all the pdf documents), and paste it
> on this same textbox, I obtain:
> V I IN TI MO

Works fine here (no extra spaces) with poppler 0.24.2 and 0.25. What poppler version are you using (can be determined with pdftotext -v from console)?
Comment 6 Dario Bertero 2013-12-25 02:42:07 UTC
Version 0.24.4, the one currently provided by Arch linux repositories.
Comment 7 Albert Astals Cid 2013-12-27 13:40:14 UTC
I tried okular 0.17.4 with poppler 0.24.4 and could not reproduce the problem either.

Just for completion, it does happen when pasting from okular to any program, right?
Comment 8 Dario Bertero 2013-12-27 15:29:11 UTC
Right.
Comment 9 Dario Bertero 2013-12-29 08:06:00 UTC
Created attachment 84318 [details]
Copy and paste of the example document

I updated Okular to version 0.18, and the bug is still there. For more clarity, I attach a text file with my copy and paste of the whole example document already provided.
Comment 10 Dario Bertero 2013-12-29 15:09:48 UTC
I found out what was the problem. For some strange reason Okular was using mupdf instead of poppler. Removing the mupdf package (don't remember which package carried it as a dependency, as it seemed totally unneeded) everything is working properly. Still cannot understand why Okular was relying on mupdf and not on poppler beeing both installed.
You may close this issue, sorry for the useless report.
Comment 11 Albert Astals Cid 2013-12-29 15:10:49 UTC
Because you maybe installed the unsupported okular-mupdf package?
Comment 12 Dario Bertero 2013-12-29 15:33:02 UTC
Yes, but is it normal that installing the unsupported mupdf package (by mistake or due to some dependencies) it switches automatically to the latter without letting you choose or at least giving a warning?
Comment 13 Albert Astals Cid 2013-12-29 15:44:25 UTC
We're not the ones that code that okular-mupdf package so can't comment why they decided to go for high priority over okular-poppler. It does not ask you which one to use because you have that option disabled on your settings.