Bug 115068 - FILESAVE EXPORT as HTML : bad positioned images in HTML export
Summary: FILESAVE EXPORT as HTML : bad positioned images in HTML export
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.6.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:html
Depends on:
Blocks: (X)HTML-Export
  Show dependency treegraph
 
Reported: 2018-01-17 13:14 UTC by Marian
Modified: 2023-04-14 03:25 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
sample spreadsheet file (41.56 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-01-17 13:14 UTC, Marian
Details
XLSX file transformd in ODS (64.37 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-01-18 12:56 UTC, Marian
Details
saved to html with different LO versions (1.08 MB, application/zip)
2018-01-18 17:25 UTC, Xavier Van Wijmeersch
Details
Conversion results (1.77 MB, application/zip)
2018-01-19 10:41 UTC, Marian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian 2018-01-17 13:14:43 UTC
Created attachment 139150 [details]
sample spreadsheet file

The attached file is correctly displayed in Libre Office (in versions 5.1.6 and 5.4). But when exporting it in HTML (or when clicking in "Preview in browser") the images "Browser" and "Browser details" (i.e. the rightmost objects in the file) are displayed *at the bottom* of the HTML file.

Could this be eventually fixed by a certain configuration parameter?
Comment 1 Marian 2018-01-17 13:20:36 UTC
Exporting in PDF exhibits the same bad image positioning.
Comment 2 Xavier Van Wijmeersch 2018-01-17 17:46:16 UTC
Hi

I tested the xlsx file and the both images are down the HTML file
But when saving the xlsx file in a ods file then with LO 5.4.4.2 and 6.1.0.0master both images are on the place where they belong
My suggestion is save the file in the native ods file from LO and then export to HTML file
Comment 3 Marian 2018-01-18 12:55:21 UTC
>My suggestion is save the file in the native ods file from LO and then export to HTML

I've tried that (with LO 5.4) and got the same result! How did you get a good HTML representation?

Me I have tried in 2 ways (after loading the ODS file):
  1) File -> Export -> XHTML : the browser's console exhibits some errors, but no image is displayed; however in the document there are some <img style="height:14,879cm;width:20,249cm;" alt="" src="data:image/*;base64,VkNMTVRGAQAx...> tags
  2) File -> Save as -> HTML Document (Calc) -> here I get an HTML file + some png images, but the 2 at rightmost are actually displayed at the bottom.

I shall try with the 6 version to see what happens.
Comment 4 Marian 2018-01-18 12:56:55 UTC
Created attachment 139183 [details]
XLSX file transformd in ODS
Comment 5 Xavier Van Wijmeersch 2018-01-18 17:25:14 UTC
Created attachment 139192 [details]
saved to html with different LO versions

Here you have all test i have done with attachment 139150 [details] that i saved as a ods file
Comment 6 Xavier Van Wijmeersch 2018-01-19 06:50:21 UTC
With File => export=> xhtml i have the same results like you explain in comment 3, i have also the wrong results, no images at all, only text
But with File => save as => html document then i have the correct results, see the zip file; i did forgot to explain properly

Best regards
Comment 7 Marian 2018-01-19 10:41:47 UTC
Created attachment 139210 [details]
Conversion results

The original XLSX file, converted to ODS using LibreOffice 5.1.6.2 and then converted to HTML.
Comment 8 Marian 2018-01-19 10:51:47 UTC
Yes! Your ODS file, displayed with my LibreOffice 5.1.6.2 (from Ubuntu Xenial) is correctly converted to HTML! There's actually no need to convert it to HTML, one should simply select "Preview in web browser".

However, my ODS file, generated with the same LibreOffice 5.1.6.2 **is different** and produces the result you see in the attached ZIP ("Conversion results"). So either the results depends on the LibreOffice version (which one did you use to convert the file?) or on the user parameters - that's why I have enclosed in the ZIP my ~/.config/libreoffice/4/user folder.
Comment 9 Marian 2018-01-19 11:18:40 UTC
Basically all is related to the conversion to the ODS format -> your conversion is more suitable to be displayed as a HTML file, mine not! :-(
Comment 10 Xavier Van Wijmeersch 2018-01-20 08:14:50 UTC
@Marian

first download a AppImage from https://libreoffice.soluzioniopen.com/
5.4.4.2 or 6.0.1.0; you only need make them executable

second in the ods file you need to move a bit the OS an browser image;
a bit lower and between them a bit more space

this will give you the same results as i have become when tested

Best regards
Comment 11 Xavier Van Wijmeersch 2018-01-21 08:33:42 UTC
Will close because as its working for me in "preview in browser"; "save as HTML document"
If you or not agree, you can still reopen the report

Best regards
Comment 12 Marian 2018-01-21 11:54:48 UTC
According to the answer I've got

>in the ods file you need to move a bit the OS an browser image;
>a bit lower and between them a bit more space

For me there are 2 problems/bugs actually:
- the internal representation of an XLSX file could not be automatically converted to an identical HTML representation, one should apparently pass through an intermediate stage of converting the image to the ODS format,
- even in this case the result needs to be manually trimmed in order to get an acceptable HTML representation, albeit the fact that LO displays it well.
Comment 13 Marian 2018-01-21 14:24:58 UTC
There's actually no need to pass through an ODS file - even the original XLSX file, once the images rearranged by hand, is saved correctly in HTML format.

However this prevents any possibility to do script conversions (using '--headless--nofirststartwizard --nolockcheck --nologo --invisible' options) with LibreOffice...
Comment 14 Xisco Faulí 2018-01-22 10:52:43 UTC
You can't confirm your own bugs. Moving it back to UNCONFIRMED until someone
else confirms it.
Comment 15 Marian 2018-01-22 16:51:41 UTC
Well, it seems that  Xavier Van Wijmeersch reproduced my problem, except that his solution is unacceptable for somebody who tries to perform batch conversions with Libre Office...
Comment 16 Marian 2018-01-24 11:33:41 UTC
Any news about this bug?
Comment 17 Marian 2018-01-25 09:28:42 UTC
Tests done with LO 5.1 (from Ubuntu 16.04) and 6.0.
Comment 18 QA Administrators 2019-01-29 03:48:19 UTC Comment hidden (obsolete)
Comment 19 mattia.b89 2019-04-13 20:15:27 UTC
I can confirm that the bug is present in
Version: 6.2.2.2
Build ID: 6.2.2-4
CPU threads: 4; OS: Linux 5.0; UI render: default; VCL: gtk3; 
Locale: it-IT (en_GB.UTF-8); UI-Language: en-GB
Calc: threaded
Comment 20 QA Administrators 2021-04-13 03:40:06 UTC Comment hidden (obsolete)
Comment 21 QA Administrators 2023-04-14 03:25:31 UTC
Dear Marian,

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 with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

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) from https://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: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug