Bug 451762 - Select with Layout
Summary: Select with Layout
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Other
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-21 12:14 UTC by flywire
Modified: 2022-03-21 14:49 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description flywire 2022-03-21 12:14:29 UTC
When I select text from a pdf the layout is lost. I'd like to 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:

```
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
```

```
>pdftotext -layout -nopgbrk test.pdf -
Lorem ipsum dolor sit amet,
       consectetur adipiscing

elit. sed do eiusmod
```

copy/paste wth okular loses the layout:

```
Lorem ipsum dolor sit amet,
consectetur adipiscing
elit. sed do eiusmod
```