This forum has been archived. All content is frozen. Please use KDE Discuss instead.
Please use bugs.kde.org for bug reports or feature requests. Development related questions should be directed to the okular-devel mailing list.

Select with Layout

Tags: None
(comma "," separated)
flywire
Registered Member
Posts
30
Karma
0

Select with Layout

Sat Mar 19, 2022 8:43 pm
When I select text from a pdf the layout is lost. Can I select text and paste to a text editor with leading and trailing spaces and blank lines?

I want to select some lines from a file with the gui but I can demonstrate it with the following file. Decoding the pdf file clearly shows the layout with leading and trailing spaces and a blank line:

Code: Select all
stream
/F1 10 Tf
BT
40 763.07751 Td
0 -11.0775 Td
(Lorem ipsum dolor sit amet,) Tj
0 -11.0775 Td
(    consectetur adipiscing ) Tj
0 -11.0775 Td
() Tj
0 -11.0775 Td
(elit. sed do eiusmod) Tj
ET

endstream


Code: Select all
>pdftotext -layout -nopgbrk test.pdf -
Lorem ipsum dolor sit amet,
       consectetur adipiscing

elit. sed do eiusmod

[Select from this code box strips the layout too.]

copy/paste wth okular loses the layout:
Code: Select all
Lorem ipsum dolor sit amet,
consectetur adipiscing
elit. sed do eiusmod
dzon
Registered Member
Posts
493
Karma
3

Re: Select with Layout

Sun Mar 20, 2022 9:29 am
I don't think it's possible in okular. When I need a part, with a certain layout, printed, I use libreoffice for that. That one has an option to save the selection as is.


This realm's name is Maya. And she speaks Hertz. But Ahamkara makes a fuzz about it.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]