Pasting into gnome-text-editor keeps artificial EOLs when word processors (e.g. LibreOffice Writer, Google Docs) does away with them
System information
What is your operating system and version? Arch Linux
What is the version of GNOME Text Editor? 46.1
This issue is closely related to the issue as described here in that it deals with how text is processed in copying and pasting between PDFs and and text editors / word processors. In short, copying text from the built-in PDF viewer of Chromium based browsers (as opposed to Firefox or Evince) and copying it into word processors such as LibreOffice Writer or Google Docs always results in the text being transferred as plain text, without the "artificial" line breaks stemming from how the original text was formatted in the PDF.
If for example you have text which is constrained by the confinements of a table, copying it from gnome-document-viewer will always result in the exact same line breaks as in the original PDF, but copying text from within the PDF viewer of Chromium based browsers is known to result in plain text without artificial line breaks.
For illustration purposes:
Text in PDF / when copied to gnome-text-editor:
Hello, this is some text with
line breaks due to it being
written in a table. When it
is copied from a Chromium
based browser and pasted
into LibreOffice Writer
these "artificial" line
breaks will not show up.
Pasted text Chromium Based PDF-viewer -> LibreOffice Writer / Google Docs:
Hello, this is some text with line breaks due to it being written in a table. When it is copied from a Chromium
based browser and pasted into LibreOffice Writer these "artificial" line breaks will not show up.
The gnome-text-editor, however, always formats the text as in the first example, even when pasting from Chromium based PDF-viewers. This is not the expected behaviour.
PS. I notice now that maybe it is the expected behaviour for text editors, after all, as I see the same results in Kate and Gedit. But perhaps one can somehow add another kind of "Paste" in gnome-text-editor that produces the same result as when pasting into word processors such as LibreOffice and the like?
Bug information
Steps to reproduce
- Using a Chromium-based browser as you PDF-viewer, copy the second paragraph of this file beginning with "By default, the data…".
- Paste the text into LibreOffice Writer or Google Docs and see how it's formatted as one paragraph.
- Paste the text into gnome-text-editor and notice how the text is formatted exactly as in the original PDF, with the "artificial" line-breaks.