SufficientlySecure / document-viewer

Document Viewer is a highly customizable document viewer for Android.
GNU General Public License v3.0
518 stars 155 forks source link

Feature request: Selecting, copying text #93

Open Bubu opened 9 years ago

Bubu commented 9 years ago

Hello, I really would like to select and copy text from the document opened in this app. I don't know how difficult this would be to implement into the current codebase. It seems like a really basic feature so maybe there is a reason why it's not there?

tuxor1337 commented 9 years ago

Usually, I tend to say that feature requests for this app are hopeless at the current pace of development. But in this case, I can at least say that it should be somehow achievable because copying is a working feature of the MuPdf Android app (and libmupdf is at the core of Document Viewer's PDF, EPUB and XPS support).

Furthermore, keyword search is currently supported by Document Viewer and keywords are highlighted in a similar way as you would expect it to look like when selecting text.

Bubu commented 9 years ago

Well support for pdf (and the other mupdf formats) would already be a huge improvement.

abderrahim commented 9 years ago

I'd like to implement this feature but need some help.

I've found there is getPageText method, that is implemented for djvu. I've tried to use it, but found it didn't release resources properly. I've fixed it (169cbe629cc096c4236c17ae4a9dbf847d6c5326), and managed to get the text where the user presses (b80d45c7a8a774b6ca5f0ab48b23eebd1f75e7b6) but don't know where to go frome there.

Is what I did okay? and what should I do now?

Nowaker commented 7 years ago

Ping on that - would be really good to have it.

rituraj22 commented 6 years ago

This is the single biggest issue with the app right now. It'd be really awesome if this feature was implemented

agguser commented 6 years ago

Any update?

ristein commented 3 years ago

this would be a very nice feature, I can't find any opensource pdf-reader supporting this

ildar commented 3 years ago

MuPDF (Lightweight document viewer) - https://f-droid.org/packages/com.artifex.mupdfdemo

Though it's officially deprecated and have security issues.