You are not logged in.

#1 2021-02-18 16:34:04

teckau22
Member
Registered: 2021-02-18
Posts: 1

Problem copying text with mupdf

I'm using the package mupdf-gl, WM is i3.

With mupdf-gl, holding the right mouse button and dragging selects text, but as soon as the button is released the selection disappears. So, it's not possible to copy the selected text, as holding the RMB while doing Ctrl-C does not register the copy command. The same goes for choosing which annotation type to create in the annotation drop-down menu (the LMB must remain pressed, or the drop-down menu disappears).

If I instead use the package mupdf, I can copy text (since releasing the RMB does not make the selection disappear), but the selected region does not "snap" around the text. I can draw an arbitraty rectangular region on the page, but it's like mupdf does not "see" the text. For example, if there's a sentence that starts in the middle of line 1 and ends in the middle of line 2, I don't have a choice but to copy the full two lines. Here's what I'm talking about: https://imgur.com/a/YfezF2f

Note that this is from a pdf that I generated myself, there is no protection involved. How can I manage to correctly copy text from a pdf with mupdf?

Offline

#2 2021-02-18 20:21:35

seth
Member
Registered: 2012-09-03
Posts: 58,717

Offline

#3 2021-02-18 20:22:34

xerxes_
Member
Registered: 2018-04-29
Posts: 787

Re: Problem copying text with mupdf

Try something like this:
1. First way: double click or select some text in mupdf (don't mind if selection disappears) and then open your favorite text terminal and press shift+insert or ctrl+shift+v,
2. Second way: select some text in mupdf and while holding LMB press ctrl+c  (don't mind if selection disappears) and then open your favorite text terminal and press shift+insert or ctrl+shift+v.

When it will work in terminal we will think about copying it elseware.

Offline

#4 2021-02-18 21:28:46

progandy
Member
Registered: 2012-05-17
Posts: 5,263

Re: Problem copying text with mupdf

mupdf-gl relies on a patched freeglut for clipboard access. arch builds it with system freeglut which does not have clipboard functions.

https://github.com/ArtifexSoftware/thir … its/master

https://github.com/archlinux/svntogit-c … GBUILD#L31

https://github.com/NixOS/nixpkgs/issues … -777853207

I'm not sure about the legacy mupdf version.

Last edited by progandy (2021-02-18 21:33:49)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB