Is full-page copy (from browser) a limitation of LibreOffice Writer?

Hello, I’m encountering an issue and need some help.

  1. I opened a blank document in LibreOffice Writer.
  2. Then, I visited www.google.com, clicked on an empty spot on the page, and pressed Ctrl+A to select all the content.
  3. After that, I pressed Ctrl+V to paste it into LibreOffice Writer.

However, The application becomes unresponsive several seconds, the content pasted, but the formatting doesn’t resemble the original page.

I expected that copying and pasting a simple web-page should be done quickly and accurately. However, when I try to paste the full page content, the status bar shows “importing document” and gets stuck. You can even try this with any post page on ask.libreoffice.org and see the same issue.

Is there a better way to handle this, or is it a limitation of LibreOffice Writer?

Version: 24.2.6.2 (X86_64) / LibreOffice Community
Build ID: ef66aa7e36a1bb8e65bfbc63aba53045a14d0871
CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-CA (en_CA); UI: en-GB
Calc: threaded

Edit: Application version updated.

I have no experience with Window$ clipboard which has issues with “external” copy.

Generally, pasting straight web page contents is a bad idea because it is HTML and this needs a conversion/translation to insert it into Writer. In addition, HTML page tend to have weird encoding for spaces: you frequently end up with U+00A0 NO-BREAK SPACE instead of the standard U+0020 SPACE. This then disturbs severely the line wrap/justify algorithm.

HTML formatting can only be approximated during the conversion and “formatting doesn’t resemble the original page” is a common consequence of this.

The best approach is to paste as unformatted text and restyle the data so that all HTML/CSS idiosyncrasies are eliminated in teh process and you have an opportunity to apply styles instead of the direct formatting of the conversion.

I selected this page in Firefox 029.0.2 by pressing Ctrl+A and pasted it into LibreOffice Writer. The process took a second or two, and a bit less for the google link. Of course the layout didn’t match the web page for the reason @ajlittoz gave.
Maybe something else is getting in the way?
,
Version: 24.8.0.1 (X86_64) / LibreOffice Community
Build ID: 6fd6cae02baed1e82d14ed2da1f2458092354dab
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: en-NZ (en_NZ); UI: en-GB
Calc: CL threaded

1 Like

As mentioned many Webpages are inserted with own rules. I copied the above mentioned webpage of Google and got 4 sections and a very new layout.

A better way to preserve the layout of webpages is to create images of them (many add-ons do that) or to print out as a PDF file.

Note: Other text processing programs have similar problems when copied webpages are inserted via clipboard (e. g. Onlyoffice, text module).


Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Ubuntu package version: 4:24.2.5~rc2-0ubuntu0.22.04.1~lo1
Calc: threaded


EDIT
I added (from browser) in the original question.

Thanks, you mentioned that Windows has issues, but the LibreOffice is stuck at all its windows during the operation.

Maybe your device is stronger than mine? Mine takes 1 minute for this page and 10 seconds for the google one.