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 220.127.116.11; 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 18.104.22.168, 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 22.214.171.124 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.