Copy text from a PDF document and paste it, display strange characters

Bug #49631 reported by Nicola Jelmorini
30
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evince
Expired
Medium
evince (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Here how to reproduce it:

1) I have created a little text file with gedit editor
2) Then I have printed it with the "Create a PDF document" option in gedit.
3) Now open the PDF document created with Evince
4) Select the text and copy
5) Return to gedit and paste the text copied out from the PDF
6) All the text is composed of strange characters. The original gedit text is lost.

For Instance I wrote in gedit the following text:
"Text to testing PDF production"
and I have created a PDF document. I open the PDF in Evince and I select and copy the text.
Then I paste the text into gedit again and following strange character are displayed:
"8I\X XS XIWXMRK 4(* TVSHYGXMSR"

I attach to this post the two files (txt and pdf), so you can test if the problem is present on your PC too.

Revision history for this message
Nicola Jelmorini (jelmorini) wrote : gedit txt file used to produce a PDF document

use the gedit option "Create a PDF Document" to print the text in PDF form.

description: updated
Revision history for this message
Nicola Jelmorini (jelmorini) wrote : PDF document produced from gedit editor

This is the pdf I have produced from gedit editor with the "Create a PDF Document" option.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. I've forwarded the issue upstream: http://bugzilla.gnome.org/show_bug.cgi?id=344892

Changed in evince:
assignee: nobody → desktop-bugs
status: Unconfirmed → Confirmed
Changed in evince:
importance: Untriaged → Low
Changed in evince:
status: Unknown → Unconfirmed
Revision history for this message
Nicola Jelmorini (jelmorini) wrote :

Only to confirm that with Ubuntu Edgy this bug is always present.

Revision history for this message
Nicola Jelmorini (jelmorini) wrote :

Only to confirm that with Ubuntu Feisty this bug is still present.

Changed in evince:
status: Confirmed → Triaged
Revision history for this message
Pascal de Bruijn (pmjdebruijn) wrote :

I've tried this PDF with Adobe Acrobat Reader 8.1.2 as well, and Adobe Acrobat reader also produced weird output when copy-pasting.

So the bug probably occurs when gEdit exports to PDF, and not in Evince when viewing/copy pasting it!

Revision history for this message
Sebastien Bacher (seb128) wrote :

could you try if that's still an issue on hardy? the new gedit uses gtkprint now

Changed in evince:
status: Triaged → Incomplete
Revision history for this message
Nicola Jelmorini (jelmorini) wrote :

I have tried the same thing with Ubuntu Hardy and I can confirm that now the problem is resolved.

With Gedit I have created two PDF files: one with the "Print to file" option, and one with the "PDF" (cups-pdf) option
The first one is created by "cairo 1.6.0 (http://cairographics.org)"
The second by "GPL Ghostscript 8.61"

Both PDF files are now good. I have copied from both of them and pasted in Gedit, and the text is perfect.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks you for the feedback, closing the report.

Changed in evince:
status: Incomplete → Fix Released
Changed in evince:
status: New → Invalid
Changed in evince:
importance: Unknown → Medium
status: Invalid → Expired
Revision history for this message
Andris Berzins (pkix) wrote :

The same problem with this document:
https://www.ria.ee/public/PKI/kruptograafiliste_algoritmide_elutsukli_uuring_II.pdf

Copying any paragraph results in this garbage:
❑rü♣t♦süst❡❡♠✐❞ ♠✉r❞✉✈❛❞ ❡♥❛♠❛st✐ ♠✐tt❡ ü❧❡öö✱ ✈❛✐❞ ❥är❦❥är❣✉❧t✳

Using ubuntu 13.10 evince 3.10.0 Using poppler/cairo (0.24.1).

I tried to compile latest evince/poppler and with it copying works fine:
3.11.3 Using poppler/cairo (0.25.1)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.