sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
13.04k stars 1.68k forks source link

copy/select problems in some languages #4357

Open srsh-kh opened 2 weeks ago

srsh-kh commented 2 weeks ago

Copying text from Persian (or arabic) language and pasting it results in reversed text. Also, selecting a whole line in these languages are difficult as the selector constantly selects a different portion of the text while I'm trying to select the entire text.

GitHubRulesOK commented 2 weeks ago

Many RTL PDF documents are often not written correctly since most PDF generators dont set or use the RTL fonts correctly. So not a generic issue with SumatraPDF unless it is a problem for the underlying MuPDF reader or a poorly written file.

There is no way to guess without a specific example, however I will say your observations are not uncommon for cursive writing such as Asian Hebrew Arabic Persian etc. especially those with mixed content such as Latin LTR characters e.g. 2024.

@kjk I dont know if this is a good sample but SumatraPDF fails to select firs and last character in a block or single line

image ArabicCIDTrueType.pdf

kjk commented 2 weeks ago

Which version?

Have you tried with pre-release? (https://www.sumatrapdfreader.org/prerelease)

If it happens in pre-release, you need to provide a sample PDF showing the problem. Nothing I can do without it.

srsh-kh commented 2 weeks ago

Well. I just tried the pre-release and it seemed to be resolved. But both versions have another problem as well which is when I uncheck the "use tabs" option, whenever I open a new document it will also open another document that I have previously opened and it does it every time. For example I open A.pdf then close it and then open B.pdf and it opens both files simultaneously.

srsh-kh commented 2 weeks ago

Also, still in the pre-release when I try to select a line in languages like Persian it's very difficult or almost impossible to select a line completely and it suddenly jumps to another portion of the text. In Adobe Acrobat I have neither of these problems. For example in this document: https://civil.sadjad.ac.ir/sites/civil.sadjad.ac.ir/files/%DA%AF%D8%B2%D8%A7%D8%B1%D8%B4%20%DA%86%DB%8C%D8%B3%D8%AA.pdf