Bug 163846 - LibreOffice converts SVG images to PNG format when saved as DOCX format
Summary: LibreOffice converts SVG images to PNG format when saved as DOCX format
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: DOCX-Images
  Show dependency treegraph
 
Reported: 2024-11-11 16:05 UTC by kebab
Modified: 2024-11-20 04:09 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample DOCX saved from LO (40.88 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-11-16 14:47 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kebab 2024-11-11 16:05:49 UTC
Description:
I am currently using LibreOffice 7.4, which converts SVG images in PNG format when saved in DOCX format, therefore when I close the document and reopen it, the images become really blurry and unreadable. 

Steps to Reproduce:
1.create a new docx file with LibreOffice
2.insert an svg image (for convenience, it is better to insert and svg file containing text) and save the as docx file, say demo.docx
3.reopen the file "demo.docx", you will find the texts are blurry, if you extract the docx file as zip file, you will find the svg files are stored as png.

Actual Results:
The SVG was converted to PNG file and saved in docx file. 

Expected Results:
docx supports emf embedding, just like SVG files, are vector image files, which means that the printing and viewing quality can be ensured.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.4.7.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 2; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: zh-CN (zh_CN.UTF-8); UI: zh-CN
Debian package version: 4:7.4.7-1+deb12u5
Calc: threaded
Comment 1 zcrhonek 2024-11-15 09:15:25 UTC
I can confirm with Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7a7ba9cbee91485a9254949d1594352b3629c070
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

SVG image is converted to PNG. According https://support.microsoft.com/en-us/office/edit-svg-images-in-microsoft-365-69f29d39-194a-4072-8c35-dbe5e7ea528c the SVG should be supported in Word, but I've tried insert SVG file in online version of office365 and SVG is not supported.

It's like bug 130642
Comment 2 Aron Budea 2024-11-16 14:45:10 UTC
This is supposed to be implemented since 24.2, see bug 126084, can you upgrade and check?
Comment 3 Aron Budea 2024-11-16 14:47:00 UTC
Created attachment 197653 [details]
Sample DOCX saved from LO

Here's a sample DOCX saved from a LO 25.2 daily build, with the following SVG inserted:
https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/DroidSans.svg
Comment 4 kebab 2024-11-20 04:09:20 UTC
This problem has been addressed in version 24.8.3 on Windows, however the svg file in docx falls back to low-resolution png when opened with MS Word 2016, according to my calculation, the resolution was ~80dpi, which is unreadable for texts.