Bug 81232 - wrong page count and page breaks printing or pdf-exporting an xlsx file
Summary: wrong page count and page breaks printing or pdf-exporting an xlsx file
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
3.6.0.4 release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-11 13:33 UTC by Roeland
Modified: 2015-07-28 19:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Archive with the original xlsx and the pdf results from LibreOffice and Microsoft Office 2010 (375.76 KB, application/x-rar-compressed)
2014-07-11 13:33 UTC, Roeland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roeland 2014-07-11 13:33:02 UTC
Created attachment 102618 [details]
Archive with the original xlsx and the pdf results from LibreOffice and Microsoft Office 2010

When trying to create a pdf out of this xlsx file (originally made in Microsoft Office) we noticed something strange. The pdf from Microsoft Office 2010 is a 18 page document (the correct amount), while the pdf created by libreOffice has 44 pages.

Trying to print the xlsx also gives me different results, Microsoft office wants to print 18 pages, while LibreOffice wants to print 38 (?) pages.

There are also some stranges breaks in the pdf made by Libreoffice (see page 2 of the attached pdf) that shouldn't be there.

I don't really know whether this is a export problem or a problem with the import of an xlsx file.
Comment 1 tommy27 2014-07-12 05:00:48 UTC
I tested under Win7x64 and it's reproducible with 4.2.5 and 3.6.0 as well (haven't tried older releases)

interestingly if you use 4.4.0.0.alpha0+ (*) the exported pdf has 37 pages instead of 44

if you use AOO 4.1 the final pdf has 19 pages and I see no strange page breaks which are instead present in LibO... so developers could compare LibO and AOO code to fix the issue in LibO



(*) Build ID: d5dd1216804afae35d7fe7dbb1d37b0ca1fcce88
TinderBox: Win-x86@39, Branch:master, Time: 2014-07-11_00:09:47
Comment 2 QA Administrators 2015-07-18 17:42:55 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.1 or later): https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword


Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2015-07-18
Comment 3 Jasper 2015-07-27 10:04:41 UTC
I open attached xlsx in MS Office 2010, Version 14.0.7153.5000 (64-bit):
* under Page Break Preview, it shows 19 pages.
* under Page Setup, it shows Scaling adjected to 90%.

I open attached xlsx in LibreOffice 4.4.2.2:
* under Page Break Preview, it shows 44 pages.
* under Page Setup, it shows Scaling factor of 100%.
* if I change the scale factor to 90%, preview shows 19 pages.
Comment 4 Roeland 2015-07-27 10:07:52 UTC
Hi Jasper, thanks for testing. I guess this means the bug has been fixed, or wasn't a bug after all..
Comment 5 Jasper 2015-07-27 10:26:22 UTC
Hi Roeland.

When I open the xlsx in LibreOffice 4.4.2.2:
* Change the scale factor to 90%.
* Save back in MS Excel 2007/2010/2013 XML Format (Ignoring content format warning).

Then open the saved xlsx in MS Office 2010, the Scaling shown is 100%.

Seems like scale factor in XLSX format doesn't work across LibreOffice and MS Excel.


P.S.: Tested using Windows 7. Regardless if this is a bug, I would vote for LibreOffice to read/write scale factor in XLSX, like it was done in MS Excel.


Thank you.
Comment 6 Jasper 2015-07-27 10:39:33 UTC
In AOO 4.1.1, it reads the scaling factor correctly as 90%, but it is not able to save in XLSX format.

I would say this issue would be resolved if LibreOffice can read the scaling factor correctly for XLSX format. Since the issue pertains to exporting to the PDF format.
Comment 7 Timur 2015-07-27 11:54:03 UTC
Scaling is an existing Bug 86396.
As written here, LO now saves 19 pages comparing to MS 18 pages, so I would set this to WorksForMe for the original bug.
It's possible to note the small difference in layout between LO and MS which results in that 1 page, but that should be a new bug, if one can see where the difference comes from. 
Otherwise, I am doubtful whether that could be corrected with reasonable effort.
Comment 8 Roeland 2015-07-28 19:05:31 UTC
@Timur, fine for me. 
Jasper, what do you think?