Bug 117254 - PDF: has charts rendered in wrong position (imported as Star Obj Descr (XML))
Summary: PDF: has charts rendered in wrong position (imported as Star Obj Descr (XML))
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, regression
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2018-04-26 15:44 UTC by Lorenzo Chiola
Modified: 2019-07-08 08:31 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
contains the graphs that are rendered in the wrong position (55.34 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-04-26 15:44 UTC, Lorenzo Chiola
Details
PDF output showing wrong position of charts (116.66 KB, application/pdf)
2018-04-26 15:46 UTC, Lorenzo Chiola
Details
How I looks for me in LibreOffice 6.1 master (128.22 KB, application/pdf)
2018-05-02 11:38 UTC, Xisco Faulí
Details
The original source of the faulty document data (99.00 KB, application/vnd.ms-excel)
2018-05-02 19:51 UTC, Lorenzo Chiola
Details
Comparison preview-vs-PDF of the xls source (187.88 KB, image/png)
2018-05-02 20:00 UTC, Lorenzo Chiola
Details
New ods - pdf chart position comparison (122.48 KB, image/png)
2019-07-08 08:08 UTC, Lorenzo Chiola
Details
New comparison preview-vs-PDF of the xls source (150.22 KB, image/png)
2019-07-08 08:31 UTC, Lorenzo Chiola
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Chiola 2018-04-26 15:44:32 UTC
Created attachment 141653 [details]
contains the graphs that are rendered in the wrong position

Document origin:
Charts in the attached calc-doc were copied from another file (which in turn was imported from a MS Excel .xls sheet) (with "paste special", option "Star Object Descriptor (XML)"); sheet1 "misure" is a perfect copy of part of the original sheet, while sheet2 "calcoli" doesn't contain formulae, because I only needed to prepare the thing for printing.
Then I have modified page breaks with "Menu -> View -> Page break" mode.

Issue:
All the charts are rendered in the wrong position when: "printing to file" (PDF), "all sheets", from the print dialog.
It seems that only vertical position is affected, while horizontally the charts are in the right place; however it should be noted that they are next to the left margin and some unwanted movement to the left could be constrained because of this.
See attached output PDF.

The anchor setting of the charts is "to cell"; setting their anchor to "to page" apparently fixes the problem.

This doesn't happen in a Writer document, however it is possible that I didn't test Writer thoroughly.

https://bugs.documentfoundation.org/show_bug.cgi?id=113143 may be related.
Comment 1 Lorenzo Chiola 2018-04-26 15:46:33 UTC
Created attachment 141654 [details]
PDF output showing wrong position of charts
Comment 2 raal 2018-04-30 12:13:42 UTC
I can confirm with Version: 6.1.0.0.alpha1+
Build ID: 653e58f9eb3d4ee61d8103993cdff2660c9127a5
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3; 
regression
Comment 3 Xisco Faulí 2018-05-02 11:38:12 UTC
In my case, if I print to PDF using 'Page Break Preview' the chart overlaps the cells bellow...

Reproduced in

Version: 6.1.0.0.alpha1+
Build ID: 43af818557904450b13839350c65ad865b9ee9d2
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

and

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

@Raal, why is it a regression ?
Comment 4 Xisco Faulí 2018-05-02 11:38:43 UTC
Created attachment 141834 [details]
How I looks for me in LibreOffice 6.1 master
Comment 5 Lorenzo Chiola 2018-05-02 19:51:17 UTC
Created attachment 141846 [details]
The original source of the faulty document data

Since I wasn't able to reproduce the issue building a chart in a new, blank, simple document:
I post here the original .xls file, from where the .ods I first posted was derived by copy-paste.
Printing this one to PDF, the charts are all offset by some pixels; a screenshot will follow. (The issue here isn't as evident as before, but since this is the source of my data, it may be relevant).
Comment 6 Lorenzo Chiola 2018-05-02 20:00:27 UTC
Created attachment 141847 [details]
Comparison preview-vs-PDF of the xls source

Images explain better than a million words.
You can see (right window) the chart in the PDF is shifted upwards a bit, if compared to the preview (left window).
Don't ask me what the blue bar is... I dare say it wasn't there while editing in some version of MS Excel.
Comment 7 Lorenzo Chiola 2018-06-04 12:04:50 UTC
Today I tried to export a .ps file, with the "Print...->  Print to file" dialog. The same issue occours as with PDF's. Maybe it's relevant.
Version: 6.0.4.2, from x64 Arch Linux official repo.
Comment 8 Buovjaga 2018-06-06 18:10:27 UTC
Hmm, I could repro with 4.3.0.0, but not with 3.5.0 (on Win) with attachment 141846 [details]
Comment 9 Buovjaga 2018-07-07 15:23:46 UTC
Bibisected on Linux with 43all to range https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=b67a51b40a4876f4bd97a2917103112006710b0c...c33019b36d613f951787ce9836e34d74bfbd6a1b
At least it has many commits from Kohei.
Comment 10 QA Administrators 2019-07-08 02:48:34 UTC Comment hidden (obsolete)
Comment 11 Lorenzo Chiola 2019-07-08 08:08:14 UTC
Created attachment 152634 [details]
New ods - pdf chart position comparison

Version: 6.2.4.2.0+
Build ID: 6.2.4-1
CPU threads: 4; OS: Linux 5.1; UI render: default; VCL: gtk3; 
Locale: it-IT (it_IT.UTF-8); UI-Language: en-US
Calc: threaded

Arch Linux libreoffice-fresh package

When I open the ODS file the chart is slightly offset downwards.
In the PDF exported from the ODS file, the chart is slightly more offset downwards.
The attachment is a screenshot of the ODS view and of the PDF side by side. In the screenshot the second chart in the file is shown; the first is offset by similar amounts in the same direction.
I tried to reposition both charts, but I'm not able to select and move either.
Comment 12 Lorenzo Chiola 2019-07-08 08:31:51 UTC
Created attachment 152636 [details]
New comparison preview-vs-PDF of the xls source

Version: 6.2.4.2.0+
Build ID: 6.2.4-1
CPU threads: 4; OS: Linux 5.1; UI render: default; VCL: gtk3; 
Locale: it-IT (it_IT.UTF-8); UI-Language: en-US
Calc: threaded

Arch Linux libreoffice-fresh package

Now the blue bar on top of the chart is gone, which is good.
The chart is slightly offset upwards in the rendered PDF when compared to the XLS viewed in LibreOffice. The amount is similar to the screenshot in comment 11.