Description: Embed a svg image in a ODT document, and embed this document into another master document(ODM). When exporting the master document to ODT, All svg images are coverted to png, even if turn off image compression in export dialogue options. Steps to Reproduce: 1. Embed svg image into ODT file 2. Embed the ODT with svg images into a master document 3. Export master document (ODM) to ODT Actual Results: All svg images are coverted to png, even if turn off image compression in export dialogue options. Expected Results: Exported ODT from ODM should keep SVG image, not rasterizing them to PNG. Reproducible: Always User Profile Reset: No Additional Info: Version: 24.2.2.2 (X86_64) / LibreOffice Community Build ID: 420(Build:2) CPU threads: 8; OS: Linux 6.8; UI render: default; VCL: kf6 (cairo+wayland) Locale: zh-TW (en_US.UTF-8); UI: en-US 24.2.2-2 Calc: threaded
Does the expert config stanza 'AddReplacementImages' set False improve things?
(In reply to V Stuart Foote from comment #1) > Does the expert config stanza 'AddReplacementImages' set False improve > things? Just tested and toggling the 'AddReplacementImages' eliminates the .png on round trip through ODF ODM master document to ODF Text .odt--look in the Zip archive in the Pictures directory. Version: 24.2.2.2 (X86_64) / LibreOffice Community Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01 CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded
(In reply to V Stuart Foote from comment #2) > (In reply to V Stuart Foote from comment #1) > > Does the expert config stanza 'AddReplacementImages' set False improve > > things? > > Just tested and toggling the 'AddReplacementImages' eliminates the .png on > round trip through ODF ODM master document to ODF Text .odt--look in the Zip > archive in the Pictures directory. > > Version: 24.2.2.2 (X86_64) / LibreOffice Community > Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01 > CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: > win > Locale: en-US (en_US); UI: en-US > Calc: CL threaded I set 'AddReplacementImages' to false and restart libreoffice, but it still convert svg to png (all svgz files not present in the exported ODM -> ODT file) for some file. I tried to create a simple file, and svg preserved, but with a complicate and big odm file, it still convert svg to png, is there a better way to debugging this?
Were the source ODF documents used in the ODM prepared before you set 'AddReplacementImages' false? If not, IIUC each will need to be reopened and saved to remove the .PNG replacment. But I think you can go through and open each ODF archive and *remove* the .PNG replacements. The .PNG from the Pictures directory, and in each content.xml find the "<draw:image xlink:href=" for the .PNG as paired to the .SVG and delete the .PNG stanza there as well. Easily scripted with sed, perl, or vim
@Tomaž, Xisco -- am I missing something on the SVG handling coming out of an ODM?
(In reply to V Stuart Foote from comment #4) > Were the source ODF documents used in the ODM prepared before you set > 'AddReplacementImages' false? If not, IIUC each will need to be reopened and > saved to remove the .PNG replacment. > > But I think you can go through and open each ODF archive and *remove* the > .PNG replacements. The .PNG from the Pictures directory, and in each > content.xml find the "<draw:image xlink:href=" for the .PNG as paired to the > .SVG and delete the .PNG stanza there as well. Easily scripted with sed, > perl, or vim Open and save every file (embeded ODT and ODM) again with `AddReplacementImages=False` does not help, It seems if the master document is created with `AddReplacementImages=True`, the exported file would get svg images rasterized, even if re-save the master document with `AddReplacementImages=False`. (Sorry for the dealyed reply, I am very busy these days.)