When saving a Writer document containing a SVG to DOCX, it get rasterized to PNG due to the current limits of this format. The convertion to PNG is done using 96 ppi only and doesn't care about the SVGs dimensions (f.e. when it got resized in LibreOffice.
So, when loading a SVG with a dimension of 30 mm × 30 mm, it gets rendered to PNG with 96 ppi and a size of 30 mm × 30 mm. When scaling the SVG to 120 mm × 120 mm, it also gets rendered to 30 mm × 30 mm, but scaled to 120 mm afterwards. In "Expert Options", you can select "PixelExportResolution", but it is ignored.
Steps to Reproduce:
1. Download a reference SVG: https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/
2. Insert it into a Write document
3. Save it to DOCX
4. Open in Microsoft Office or unpack ZIP and find the media directory
Unsharp raster image, since the dimensions and pixel resolution is too low / fixed at a default value, which might be too low in many cases.
At least it's expected to render the SVG at the target dimensions, but it's highly recommended to set a proper resolution for high quality export/printing/viewing to DOCX.
User Profile Reset: Yes
OpenGL enabled: Yes
The problem occurs on all versions, which can read and display SVG files. Ghostscript, imagemagick and pstoedit have been installed and are reachable via path variable.
Thank you for reporting the bug.
it seems you're using an old version of LibreOffice.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
I see this issue on version 184.108.40.206; restoring to UNCONFIRMED.
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug.
(Please note that the attachment will be public, remove any sensitive information before attaching it.
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Created attachment 153315 [details]
ODT document containing the same SVG image at two different sizes
When this document is resaved as DOCX using LibreOffice 220.127.116.11, the PNG images appear to be saved from the SVG source images according to the behavior described in the bug-opening comment.
Created attachment 153316 [details]
DOCX document containing PNG replacement images at two different sizes
This document is the DOCX saved using LibreOffice 18.104.22.168 from the ODT document attached above. The PNG images appear to be saved from the SVG source images according to the behavior described in the bug-opening comment.
This is also related to bug 126084, which points out the existence of a relatively new extension to Word that allows handling of SVG images with PNG fallback.
Created attachment 159109 [details]
ODT file with SVG and PNG equations
Created attachment 159110 [details]
File converted to doc format
Created attachment 159111 [details]
File converted to docx format
This bug affects the TexMaths extension (LaTeX equations in LibreOffice) ability to export SVG equations to MS Office.
Here is a small example in latest LibreOffice 6.4.2 and MS Word 2010:
- file test-6.4.2.odt contains two equations, one in SVG format, the other in PNG 600 dpi format
- file test-6.4.2.doc is the same file converted to MS doc format
- file test-6.4.2.docx is the same file converted to MS docx format
As can be seen, the exported SVG to PNG equation (in MS Word documents) has a low resolution and can't be used. The PNG equation is not affected.
Please note that exporting TexMaths SVG equations to MS Word worked in LO <= 6.0.7 and broke down from LO >= 6.1.0.
Two independent confirmations -> NEW