Copy paste from a PDF document using mupdf results in the addition of a newline character to the end of the pasted text. This is possibly seen as a convenient feature, but in reality more often than not results in the need to delete the new line. Reproducible: Always Steps to Reproduce: 1. Open a PDF in mupdf. 2. Select some word. 3. Paste it somwhere Actual Results: The pasted text is altered with the addition of a new line. Expected Results: Copying and pasting text from a PDF document should result in the text selected from the PDF being included in the new location without alteration. Patch suggestion: See http://bugs.gentoo.org/show_bug.cgi?id=403231#c3
Fixed in: commit 22bbb6e6d3bcd01b164e91ecf500dc9d7305269e Author: Robin Watts <Robin.Watts@artifex.com> Date: Thu Mar 15 17:26:58 2012 +0000 Bug 692866: Do not add a final newline when cutting/pasting. Previously MuPDF would add a newline at the end of every line. As requested in the bug, we here avoid adding a final newline. Unlike the suggested patch, we avoid adding one, rather than removing one. Thanks!
(In reply to comment #1) > commit 22bbb6e6d3bcd01b164e91ecf500dc9d7305269e This is linked to project ghostpdl.git. Shouldn't it be to http://git.ghostscript.com/?p=mupdf.git;a=commit;h=22bbb6e6d3bcd01b164e91ecf500dc9d7305269e ?
(In reply to comment #2) > (In reply to comment #1) > > commit 22bbb6e6d3bcd01b164e91ecf500dc9d7305269e > This is linked to project ghostpdl.git. Shouldn't it be to > http://git.ghostscript.com/?p=mupdf.git;a=commit;h=22bbb6e6d3bcd01b164e91ecf500dc9d7305269e > ? It should be. Sadly the hack I put into bugzilla to turn commit hashes into URLs is incapable of selecting by project, so they all point to ghostpdl.git. But the commit hash is indeed a MuPDF one.
Today I installed gentoo's mupdf-1.0 which includes your patch but I still get the extra newline at the end of a pasted text.
Today I made some more tests and found that - with some PDF it works when I copy part of a headline but not in paragraphs - with most PDFs it never works i.e. it always adds a newline
Bump?
Fixed in commit d11b67fc8140105e1659e89b6aeec61fd5ccbf37 Author: Tor Andersson <tor.andersson@artifex.com> Date: Thu Apr 17 17:11:45 2014 +0200 Fix 692866: improved handling of newlines when copying text. Only add newlines between selected lines of text.