The same problem as for evince (Bug 402071) and epdfview (Bug 403229): Copy paste from a PDF document using epdfview 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 evince. 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.
Created attachment 301699 [details, diff] Patch to remove extra newline at end of copied text Here a patch that works for me.
Ahh, forgot to say that I did not test this on windows.
Can you please report this upstream? http://mupdf.com/ My suggested snipplet (w/o looking at the rest of the code). + // remove the last newline of the copied text +#ifdef _WIN32 + if (p >= 2 && ucsbuf[p-2]=='\r' && ucsbuf[p-1]=='\n') + { + ucsbuf[p-2] = 0; + } +#else + if (p >= 1 && ucsbuf[p-1]=='\n') + { + ucsbuf[p-1] = 0; + } +#endif
(In reply to comment #3) > Can you please report this upstream? http://mupdf.com/ http://bugs.ghostscript.com/show_bug.cgi?id=692866
Upstream patched this in a git commit: http://git.ghostscript.com/?p=mupdf.git;a=commit;h=22bbb6e6d3bcd01b164e91ecf500dc9d7305269e