Summary: | app-text/poppler-0.18.3, all pdf viewer using poppler: copy adds a newline character | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Horst Prote <prote> |
Component: | [OLD] GNOME | Assignee: | Maciej Mrozowski <reavertm> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gnome, kde, printing |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://bugs.freedesktop.org/show_bug.cgi?id=45955 | ||
See Also: | https://bugzilla.gnome.org/show_bug.cgi?id=669351 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Patch for poppler-0.18.3 |
Description
Horst Prote
2012-02-03 15:09:39 UTC
If it's still valid with evince-3, please report directly to upstream -> bugzilla.gnome.org (In reply to comment #1) > If it's still valid with evince-3, please report directly to upstream -> > bugzilla.gnome.org It is indeed valid with evince-3.2.1-r1. Upstream bug filed at https://bugzilla.gnome.org/show_bug.cgi?id=669351 epdfview (Bug 403229) and mupdf (Bug 403231) have the same problem. Maybe a poppler bug then? :/ Created attachment 301655 [details, diff]
Patch for poppler-0.18.3
mupdf doesn't use poppler but for evince and epdfview you are right.
This patch for poppler-0.18.3 works for me:
At the very end of the selection no newline is added now.
But if one selects multiple lines of text it still adds newlines at the end of all lines but the last one.
I changed the subject to make clear it's a poppler bug. *** Bug 403229 has been marked as a duplicate of this bug. *** Reopening (to get it solved in the tree) and reassigning to poppler maintainers, anyway, would be better to send a bug with your patch to poppler upstream -> bugzilla.freedesktop.org Thanks a lot for the patch (In reply to comment #5) > Created attachment 301655 [details, diff] [details, diff] > Patch for poppler-0.18.3 > > mupdf doesn't use poppler but for evince and epdfview you are right. > > This patch for poppler-0.18.3 works for me: > At the very end of the selection no newline is added now. > But if one selects multiple lines of text it still adds newlines at the end of > all lines but the last one. Can you reply to upstream questions from: https://bugs.freedesktop.org/show_bug.cgi?id=45955#c1 ? Thanks (In reply to comment #9) > Can you reply to upstream questions from: > https://bugs.freedesktop.org/show_bug.cgi?id=45955#c1 > ? The two questuons from upstream: > Are you saying this is new behaviour in poppler 0.18.3? No. As far as I can see the relevant part of TextOutputDev.cc is the same in poppler-0.16.7. The behavior is new to me only because I solely used xpdf over the last decade and even the 'popplerized' xpdf in gentoo is not affected (I think it doesn't use poppler for text copying). > Have you verified your patch does not change pdftotext output? I just did a pdftotext of two pages of an pdf document with and without my patch applied and diff says the output is identical. And I'm very confident that this will always be ok as my change is in function TextSelectionDumper::getText which as far as I can see is not used by pdftotext. Patch added to poppler-0.18.4-r1 (has been accepted upstream, too) |