LO Writer automatically replaces SVGs embedded in (F)ODT files with an embedded low-resolution PNGs and drops the SVGs from the documents. This bug is consistently present in various documents and always reproducible. The "replacement PNGs" are of very low quality / resolution, which can apparently not be adjusted - rendering certain types of documents unusable.
Steps to Reproduce:
(See attached documents.)
Let's say there is an "original", previously known to work text document:
It has an SVG in a frame in the top right corner of the page. Looking at the plain XML, one can see an SVG and a PNG inside the frame ("stacked").
Open the document. Change it (a single space is enough) and save it once. Keep it open or re-open it, edit it AGAIN for a second time (yet another space for instance) and save again. Before, in-between and after, export to PDF and check the results.
If the original document, demo_01_svg-plus-png_png-shown.fodt, is opened with LO Writer 6.1, only the PNG is shown and used for PDF export.
Because this was really annoying (and I needed the document to work), I looked into the XML and removed the PNG, leaving ONLY the SVG. An example is given in demo_02_svg-only_svg-shown.fodt. If opened with LO Writer 6.1, the SVG is shown properly and the PDF export also uses the SVG.
If the new document is saved ONCE, the PNG is added "underneath" the SVG like before, restoring (more or less) the "original" state of the document, see demo_03_saved-once_svg-and-png_png-shown.fodt. If re-opened, only the PNG is shown.
If the new document is saved TWICE (or more) - even without any actual edits - the SVG is DROPPED from the document, leaving ONLY the PNG inside, see demo_04_saved-twice_svg-dropped_png-shown.fodt.
LO Writer shoud (a) display the SVG and (b) use it when exporting the document to PDF. LO Writer should NOT alter the SVG or replace it when (unrelated) edits are made to the document.
User Profile Reset: Yes
Linux: openSUSE Leap 42.3 x86_64, unmodified official distribution packages
Last LO version likely not affected: 6.0
LO version bug was likely introduced with: 6.1
Created attachment 149206 [details]
Created attachment 149207 [details]
"edited" FODT ("workaround")
Created attachment 149208 [details]
saved once (SVG and PNG, PNG shown)
Created attachment 149209 [details]
saved twice (SVG dropped, PNG shown)
As described: A file with only svg image saved results in file with svg image and png image. That file saved results in a file with only png image.
I see the error in Version: 22.214.171.124.alpha0+ (x64)
Build ID: 7c304fa6a99d1c30cf1bc6774612d96b382041d8
CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win;
Locale: de-DE (en_US); UI-Language: en-US
and in Version: 126.96.36.199 (x64)
Build ID: 9d0f32d1f0b509096fd65e0d4bec26ddd1938fd3
CPU threads: 8; OS: Windows 10.0; UI render: default;
Locale: de-DE (en_US); Calc: CL
I do not see the error in Version: 188.8.131.52 (x64)
Build ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU threads: 8; OS: Windows 6.19; UI render: default;
Locale: de-DE (en_US); Calc: CL
That versions has always only the svg image, if I start with a file with only a svg image.
(In reply to Regina Henschel from comment #5)
> I do not see the error in Version: 184.108.40.206 (x64)