#791443 okular: indentation not preserved when copy pasting text

Package:
okular
Source:
okular
Description:
universal document viewer
Submitter:
Kamaraju Kusumanchi
Date:
2015-07-04 23:21:06 UTC
Severity:
normal
#791443#5
Date:
2015-07-04 23:07:05 UTC
From:
To:
Dear Maintainer,

Upon copying text from a pdf file to an editor (ex:- gvim), the indentation of
the original text is lost.

Consider the attached pdf file which contains the following text

def print_lyrics():
    print "I'm a lumberjack, and I'm okay."
    print "I sleep all night and I work all day."

If I select this using a mouse, choose "Copy to Clipboard" option and paste it
in an editor it is pasted as

def print_lyrics():
print "I'm a lumberjack, and I'm okay."
print "I sleep all night and I work all day."

That is the indentation in the original text is lost. I tried various editors
such as gvim, vim, emacs, pico and the behavior is the same. So I am assuming
it to be a bug in okular. Could you please take a look?

thanks
--
Kamaraju S. Kusumanchi
http://raju.shoutwiki.com/wiki/Blog

#791443#10
Date:
2015-07-04 23:19:25 UTC
From:
To:
FWIW, I obtained this file by downloading the "Think Python" book from
http://www.greenteapress.com/thinkpython/thinkpython.pdf and using pdftk to
extract the page of interest.

% pdftk A=/home/rajulocal/books/thinkpython.pdf cat A44 output
indentation.pdf