Bug 112569 - Text wrapping differs in print preview and PDF export (not WYSIWYG)
Summary: Text wrapping differs in print preview and PDF export (not WYSIWYG)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Anchor-and-Text-Wrap PDF-Export Print-Preview
  Show dependency treegraph
Reported: 2017-09-22 11:36 UTC by matti.jaatinen
Modified: 2024-01-25 05:36 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Exaple document with the problem (11.85 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-09-22 11:36 UTC, matti.jaatinen
calc on editing (22.05 KB, image/png)
2017-09-22 11:38 UTC, matti.jaatinen
calc on print preview (16.23 KB, image/png)
2017-09-22 11:38 UTC, matti.jaatinen
Side by Side screen/print preview (58.81 KB, image/png)
2018-08-30 14:08 UTC, Ferry Toth
Screenshot with (linux) (53.66 KB, image/png)
2021-09-06 10:28 UTC, Ferry Toth

Note You need to log in before you can comment on or make changes to this bug.
Description matti.jaatinen 2017-09-22 11:36:55 UTC
Created attachment 136465 [details]
Exaple document with the problem

When i edit with calc, wrapping works.
When i print preview, wrapping is... broken.
Comment 1 matti.jaatinen 2017-09-22 11:38:20 UTC
Created attachment 136466 [details]
calc on editing
Comment 2 matti.jaatinen 2017-09-22 11:38:41 UTC
Created attachment 136467 [details]
calc on print preview
Comment 3 Telesto 2017-09-22 16:21:35 UTC
Repro with:
Build ID: 4067487eb304c6686a22319c51790e41e311de08
CPU threads: 4; OS: Windows 6.29; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-09-21_05:02:40
Locale: nl-NL (nl_NL); Calc: CL

and with
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL
Comment 4 Telesto 2018-03-28 09:22:53 UTC
Repro with
Build ID: 3215f89-f603614-ab984f2-7348103-1225a5
Comment 5 Ferry Toth 2018-08-30 14:07:24 UTC
This bug is marked as new, but it really is a very old one, and today it started to annoy me enough to create a bug report. Good to know I'm not alone.

Our use case is to create Bill of Materials (BOM) in Calc. The nice thing is that Calc can show you a comparison with older versions, a really useful feature for version control.

Unfortunately when word wrap is turned on the on screen word wrap is calculated different from print/pdf. But as the row height is not automatically adjusted, the wrapped text in the pdf is printed over other text, making it unreadable.

Not a good thing for a BOM, as that can lead to very expensive errors.

I am adding a screenshot with editing and print preview side by side.
Comment 6 Ferry Toth 2018-08-30 14:08:13 UTC
Created attachment 144559 [details]
Side by Side screen/print preview
Comment 7 Ferry Toth 2018-08-30 14:11:23 UTC
Oops, sorry changed back the earliest version ( I wanted to mention that this is still an issue
Comment 8 QA Administrators 2019-09-02 09:22:51 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2021-09-02 03:52:07 UTC Comment hidden (obsolete)
Comment 10 Ferry Toth 2021-09-06 10:24:37 UTC
I just retested this with and this is still broken, though in a different way. It really is not that hard to reproduce, just open the Exaple :-) provided by matti in 2017.

I'll upload a new screenshot right after this.

As you can see cell A3 overflows into A4 and A4 overflows into A5.
Comment 11 Ferry Toth 2021-09-06 10:28:13 UTC
Created attachment 174811 [details]
Screenshot with (linux)
Comment 12 Faisal 2023-08-16 11:00:59 UTC
Still can repro

Version: (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 4; OS: Linux 6.1; UI render: default; VCL: qt6 (qfont+xcb)
Locale: en-GB (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 13 Stéphane Guillou (stragu) 2024-01-24 08:31:42 UTC
Reproduced in OOo 3.3 -> inherited.

Still reproduced in recent trunk build:

Version: (X86_64) / LibreOffice Community
Build ID: 6d71c21890c908225945f0fc3566255ed150f660
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 14 Stéphane Guillou (stragu) 2024-01-25 05:36:17 UTC
Please note bug 57519 and associated conversation in bug 118729: it was decided not to change the following behaviour: reducing a column size would need to increase the row height in order to accommodate wrapped text, but it does not.

Regardless, what is described here is obviously a bug that needs some kind of resolution.