Bug 155276 - The formatting of a table is different
Summary: The formatting of a table is different
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.1.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Substitution
  Show dependency treegraph
 
Reported: 2023-05-13 08:54 UTC by defector
Modified: 2023-05-14 18:01 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
the original file (28.73 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2023-05-13 08:59 UTC, defector
Details
the print as a pdf (28.23 KB, application/pdf)
2023-05-13 09:01 UTC, defector
Details
the print as a pdf Ubuntu (23.26 KB, application/pdf)
2023-05-13 09:02 UTC, defector
Details
the calc file with changed font arial (28.75 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2023-05-13 20:37 UTC, defector
Details
print dialog ubuntu 15 pages (158.28 KB, image/png)
2023-05-13 20:50 UTC, defector
Details
screenshot print dialog Windows (538.68 KB, image/jpeg)
2023-05-13 20:55 UTC, defector
Details
empty table A4 page only frames (20.26 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2023-05-13 21:22 UTC, defector
Details
the print of that empty table A4 page only frames ubuntu (2.90 KB, application/pdf)
2023-05-13 21:24 UTC, defector
Details
the print of that empty table A4 page only frames windows (2.07 KB, application/pdf)
2023-05-13 21:25 UTC, defector
Details
the Calc file with Liberation Sans Fonts (28.88 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2023-05-14 14:52 UTC, defector
Details
test file 2 pages A4 with Liberation Sans font (8.44 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2023-05-14 15:51 UTC, defector
Details

Note You need to log in before you can comment on or make changes to this bug.
Description defector 2023-05-13 08:54:31 UTC
Description:
We create and format a table in LibreOffice 7.5.1.2 for Windows. A fixed number of columns and lines per page in A4 format is set. If we then open the same file with Linux version 7.3.7.2 Ubuntu, the formatting is incorrect. there are fewer rows and fewer columns per page with A4 format.

Steps to Reproduce:
1. create and format a table in LibreOffice 7.5.1.2 for Windows
2. set a fixed number of columns and lines per page in A4 format
3. save the file
4. open the same file in Liberoffice for Ubuntu
5. open the page preview

Actual Results:
there are fewer rows and fewer columns per page with A4 format in the Ubuntu version

Expected Results:
the format of the table should be the same in both versions of LibreOffice


Reproducible: Always


User Profile Reset: No

Additional Info:
[Information automatically included from LibreOffice]
Locale: de
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no
Comment 1 defector 2023-05-13 08:59:32 UTC
Created attachment 187238 [details]
the original file

the original file of the table created in LibreOfficce for Windows
Comment 2 defector 2023-05-13 09:01:00 UTC
Created attachment 187240 [details]
the print as a pdf

the print as a pdf 
printed in LibreOffice for Windows
Comment 3 defector 2023-05-13 09:02:30 UTC
Created attachment 187241 [details]
the print as a pdf  Ubuntu

the print as a pdf
printed in LibreOffice for Ubuntu
Comment 4 BogdanB 2023-05-13 18:37:14 UTC
Please check the font used in each OS.
If Calibri is used, but on Linux you don't have Microsoft Fonts, a substitution font is used instead, as similar as possible. 

This could be a problem, because they can have different metrics.
Comment 5 BogdanB 2023-05-13 18:40:14 UTC
12 pages on my linux, like on your Windows.
Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

12 pages also in
Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: ef106661fcc40cfdd406064cbf73fd62477d0e79
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 6 defector 2023-05-13 20:37:34 UTC
Created attachment 187253 [details]
the calc file with changed font arial

the original calc file with changed font from calibri to arial
Comment 7 defector 2023-05-13 20:43:37 UTC
When printed the original file on Windows I get 12 pages. Please see attached pdf file.
When printed the original file on Ubuntu I get 15 pages. Please see attached pdf file.

Then I changed the font from calibri to arial.
When printed the calc file on Windows I get 12 pages. 
When printed the original file on Ubuntu I get 15 pages.
Comment 8 defector 2023-05-13 20:50:57 UTC
Created attachment 187254 [details]
print dialog ubuntu 15 pages

this is a screenshot of the print dialog ubuntu 15 pages to print
Comment 9 defector 2023-05-13 20:55:21 UTC
Created attachment 187255 [details]
screenshot print dialog Windows

this is the screenshot of the print dialog Windows - 12 pages to print
Comment 10 defector 2023-05-13 21:22:24 UTC
Created attachment 187256 [details]
empty table A4 page only frames

we created an empty table A4 page only frames
Comment 11 defector 2023-05-13 21:24:26 UTC
Created attachment 187257 [details]
the print of that empty table A4 page only frames ubuntu

the print of that empty table A4 page only frames -> 2 pages to print
Comment 12 defector 2023-05-13 21:25:49 UTC
Created attachment 187258 [details]
the print of that empty table A4 page only frames windows

the print of that empty table A4 page only frames in windows -> 1 page to print
Comment 13 defector 2023-05-13 21:27:05 UTC
We created a table with no content. In the Windows version, columns A through O and rows 1 through 51 are on one A4 page. If we open the same file in Linux, columns A to L and rows 1 to 51 are on one A4 page. Columns M to O are on the second A4 page.
Comment 14 ⁨خالد حسني⁩ 2023-05-14 13:25:02 UTC
The rechnen_division_win_.pd uses Calibri font while rechnen_division_ubuntu_.pdf uses DejaVuSans. Since rechnen_division_2_.xlsx uses Calibri this suggests your Ubuntu system does not have it. LibreOffice bundles Carlito which is metrics-compatible with Calibri and would use it when Calibri is not avaialble.

Either you also don’t have Carlito, so nothing we can do here, or you have Carlito but LibreOffice is not using it which would be a bug. The same goes for Arial, we bundles its metrics-compatible Liberation Sans.
Comment 15 defector 2023-05-14 14:51:43 UTC
Today I formatted the file in Windows with the Liberation Sans font. Unfortunately, we stumble upon bug 153527, which I reported weeks ago: Ctrl+A does not select all cells for formatting. However, if I open the file I just modified in Linux, it shows the font used as 'Arial'. However, changing the font has no effect on the page view: Unfortunately, columns M to O are again on the printed page 2 in A4 format.
In the Windows version, columns A to O are on one A4 page.
I don't think the font is relevant here as the cells are larger than the digits entered.
Comment 16 defector 2023-05-14 14:52:43 UTC
Created attachment 187276 [details]
the Calc file with Liberation Sans Fonts

the Calc file with Liberation Sans Fonts
Comment 17 defector 2023-05-14 14:56:17 UTC
In the meantime I have updated LibreOffice for Windows to version 7.5.3.2. Unfortunately, this did not change the behavior described.
Comment 18 defector 2023-05-14 15:47:54 UTC
Based on the font reference, I create a new file in Windows with the Liberation Sans font. Columns A to O and rows 1 to 51 should appear on the first page in A4 format. Columns P to AD and rows 1 to 51 on the second A4 page. This file with the Linux version open shows the exact same page layout. The error described above does not occur.
Apparently, the different formatting (Win <-> Linux) described at the beginning is due to the original file being created in Windows with a non-Linux-compatible font. This is still annoying, since the user usually does not know which fonts to use for hybrid use of the same file, or not.
Comment 19 defector 2023-05-14 15:51:46 UTC
Created attachment 187278 [details]
test file 2 pages A4 with Liberation Sans font

I created a test file 2 pages A4. Creating stared from the beginnig with the Liberation Sans font -> exact same printing result in both Windows and Linux version of LibreOffice.
Comment 20 ⁨خالد حسني⁩ 2023-05-14 18:01:47 UTC
Resolving per comments above. It might be an Ubuntu issue that they don’t install the metrics-compatible fonts by default with LibreOffice, but this should be reported on Ubuntu bug tracker.