Bug Hunting Session
Bug 51510 - FILESAVE: Exporting documents with embedded SVG to doc or docx converts the image to low-resolution pixel graphics
Summary: FILESAVE: Exporting documents with embedded SVG to doc or docx converts the i...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:doc, filter:docx
Depends on:
Blocks: DOCX-Images DOC Image-DPI
  Show dependency treegraph
 
Reported: 2012-06-28 02:09 UTC by Bernd Sieker
Modified: 2019-03-01 03:50 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT and DOC files, saved from the exact same document, showing problems with doc version. (21.99 KB, application/zip)
2012-06-28 02:09 UTC, Bernd Sieker
Details
Comment 1 case 1: Bernd's .odt sample file saved as .doc file, resolution of bitmap seems better (31.50 KB, application/msword)
2012-06-28 09:19 UTC, Roman Eisele
Details
Comment 1 case 2: .odt file with SVG graphics which seems (!) to get saved as vector graphics to .doc/.docx (194.48 KB, application/zip)
2012-06-28 09:29 UTC, Roman Eisele
Details
Comment 1 case 3: .odt file with SVG graphics which becomes bitmap in .doc/.docx (535.52 KB, application/zip)
2012-06-28 09:31 UTC, Roman Eisele
Details
Collection of screenshots (PNG) showing visual output quality. (838.68 KB, application/zip)
2013-06-08 12:30 UTC, Owen Genat (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Sieker 2012-06-28 02:09:48 UTC
Created attachment 63552 [details]
ODT and DOC files, saved from the exact same document, showing problems with doc version.

When creating a document with SVG images in it, and save it as Microsoft Word document (both .doc and .docx), and reload the document, the SVGs are very low resolution pixel images, even worse than a typical on-screen preview.

The resolution is so low, that even unmagnified, individual pixels can be easily seen on the screen; printout looks completely unacceptable.

Saving and reloading OpenDocument formats retains high-quality vector graphics.

See Attachment.
Comment 1 Roman Eisele 2012-06-28 09:17:39 UTC
At least PARTLY REPRODUCIBLE with LibreOffice 3.5.4.2, German UI, on MacOS X 10.6.8 German.

This is a very interesting issue. I have tried to reproduce it, but the results are complicated.

1) I have tried to save your .odt sample file "SVG-Doc-Bug.odt" as .doc file and .docx file myself. I can confirm that the SVG diagram becomes a bitmap image, therefore REPRODUCIBLE (and set Status > NEW). However, the resolution of the bitmap is a bit better than in your sample .doc file. Therefore, there seems to be some circumstances which have influence on the resolution of the bitmap generated. This is (at least) interesting.

2) I have created some simple .odt sample files which contain some SVG graphics. At least in one case, if I save the .odt file as .doc or .docx file, the .doc and .docx file seem to contain the original vector graphics -- at least, I can scale the .doc and .docx files without any visible loss of quality.

3) In some other cases, if I save the .odt file as .doc or .docx file, the .doc and .docx file contain just bitmap images, just like in the original sample file.

So, this seems to be a complicated issue: in some cases, LibreOffice Writer seems to embed the vector graphics in the .doc/.docx files, in the other cases it just exports a bitmap image to .doc/.docx, and even the resolution of this bitmap image seems to differ in quality.

I will attach sample files for all three cases.
Comment 2 Roman Eisele 2012-06-28 09:19:49 UTC
Created attachment 63571 [details]
Comment 1 case 1: Bernd's .odt sample file saved as .doc file, resolution of bitmap seems better
Comment 3 Roman Eisele 2012-06-28 09:29:29 UTC
Created attachment 63572 [details]
Comment 1 case 2: .odt file with SVG graphics which seems (!) to get saved as vector graphics to .doc/.docx
Comment 4 Roman Eisele 2012-06-28 09:31:26 UTC
Created attachment 63574 [details]
Comment 1 case 3: .odt file with SVG graphics which becomes bitmap in .doc/.docx
Comment 5 Roman Eisele 2012-06-28 09:37:58 UTC
Could this be related to Bug 49832 - "PRINTING: Writer rasterizes SVG for output to a printer or into PDF, which leads to poor quality laser printing"? Just an idea ...
Comment 6 Roman Eisele 2012-07-08 02:09:14 UTC
Changing Component to "Printing and PDF export", as appropriate
Comment 7 stfhell 2012-12-06 19:42:18 UTC
LO 3.5/3.6 stores vector graphics as SVG internally, but every output is done via bitmaps. As Roman says, this is related to Bug 42092. (By the way, attachment 42092, "RNE sample 1, B+W floor plan.zip", also contains only a bitmap, but hi-res.) Word cannot handle SVG, so vector graphics have to be converted to EPS or a WMF format. LO doesn't do that, even the current LO 4.0.0 alpha: it still rasterizes SVG for DOCX output.

Changed component and platform. I think this will be the same on every system.
Comment 8 Michael Stahl (CIB) 2013-02-08 18:38:22 UTC
can you test if that problem still happens on 4.0, which has
a different SVG implementation?
Comment 9 Owen Genat (retired) 2013-06-08 12:30:51 UTC
Created attachment 80523 [details]
Collection of screenshots (PNG) showing visual output quality.

This bug appears to have two distinct parts. The first (a) appears to be the degradation ("low-resolution pixel graphics"), of a SVG embedded in an ODT file, when the file is saved in DOC/DOCX format. The second (b) seems to be the conversion, of a SVG embedded in an ODT file, to a raster format (e.g., PNG) when the file is saved in DOC/DOCX format. Comment #7 (and related comments in bug #42092) would seem to indicate that this second part is probably unavoidable and thus not a valid consideration for this bug. Microsoft would certainly prefer people use Silverlight in preference to SVG.

This leaves (a) which I think can now be RESOLVED as FIXED. I have tested all the attachments to this bug under Crunchbang 11 running TDF/LO v4.0.3.3 (Build ID: 0eaa50a932c8f2199a615e1eb30f7ac74279539) and there is marked improvement in the on screen display for the examples and indiscernable graphic output quality to PDF. This would appear in keeping with the remark in bug #42092#c45. There is however a difference in the nature of some of the attached SVGs that needs to be described. I will refer to the initial attachment as "BS_orig" and the other three attachments as "RME_c1_orig", "RME_c2_orig", and "RME_c3_BS_orig". Each SVG was generated by:

BS_orig = graphviz version 2.28.0.
RME_c1_orig = Inkscape.
RME_c2_orig = Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948.
RME_c3_BS_orig is simply the ODT from BS_orig resaved as a DOC.

Not all SVGs are equal and SVGs exported from Draw can behave differently again to these examples. This is not an issue for this bug but rather a consideration that must be taken into account when testing with these file formats. It is worth noting that the text in the BS_orig SVG appears formatted differently in some of my tests probably because I do not have the Helvetica Type 1 font installed. The difference described in comment #1 (point 2) and comment #3 is due to the original SVG being converted to an EMF in the DOCX (and probably DOC). The reason for this (under v3.5/3.6) is indicated in comment #7 and in several comments in bug #42092 relating to EPS handling. This is no longer the case under LO v4.0. All ODT files from BS_orig, RME_c1_orig, and RME_c2_orig, when resaved as DOCX include only a PNG.

I have attached a collection of images showing the on screen quality for the various examples and how each ODT/SVG appears when re-saved as DOC/DOCX/PNG. All are taken at 100% zoom with anti-aliasing turn on. The file names should be indicative.
Comment 10 a07cd040897db54e103c 2014-12-18 09:11:21 UTC
Might this bug be a duplicate of bug #68927? Then this one might already be fixed.
Comment 11 QA Administrators 2015-12-20 16:06:51 UTC Comment hidden (obsolete)
Comment 12 Adam Smith 2016-10-05 23:05:37 UTC
I can confirm that this bug still exists. I'm using Writer 4.2.8.2 on a Linux-64 machine. Whenever I save a file with vector graphics as a .docx, it rasterizes all my images and makes the document useless. I hope that someone can fix this soon, because it's severely impacting LibreOffice's utility for me.
Comment 13 Buovjaga 2016-11-12 08:36:19 UTC
(In reply to Adam Smith from comment #12)
> I can confirm that this bug still exists. I'm using Writer 4.2.8.2 on a
> Linux-64 machine. Whenever I save a file with vector graphics as a .docx, it
> rasterizes all my images and makes the document useless. I hope that someone
> can fix this soon, because it's severely impacting LibreOffice's utility for
> me.

Would be better to test with a fresh 5.3: http://dev-builds.libreoffice.org/daily/master/?C=M;O=A
https://wiki.documentfoundation.org/Installing_in_parallel/Linux
Comment 14 Telesto 2016-11-25 18:42:58 UTC
Confirming with:
Version: 5.3.0.0.beta1
Build ID: 690f553ecb3efd19143acbf01f3af4e289e94536
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; Layout Engine: new; 
Locale: nl-NL (nl_NL); Calc: CL
Comment 15 Xisco Faulí 2017-09-21 22:15:23 UTC
Still reproducible in

Version: 6.0.0.0.alpha0+
Build ID: 86f256596c8566e80993e1cf6035bc3534b6f816
CPU threads: 4; OS: Linux 4.10; UI render: GL; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 16 QA Administrators 2019-03-01 03:50:07 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 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 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: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

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

Warm Regards,
QA Team

MassPing-UntouchedBug