Hello,
I have an issue with quite specific pictures in LO Writer 7.6.5.2 on Windows. The issue did not appear in 7.1.6.
The issue is, when the picture is copied from LO Writer to be pasted in another application, like MS Paint, only an empty Picture will appear. The right size is kept though, the picture size in Paint gets adapted.
A workaround is to do a screenshot of the picture and paste it then from the clipboard, that will work just fine. The issue seems to appear specifically for pictures which are pasted into LO from a software called Phoenix from Certara. Sadly this is not a free software, so I can not get a copy to check the clipboard when the image is copied from there, nor can I provide an example file at this moment. Maybe the issue is known and I just did not find it with the search function. If so, sorry for my bad searching. I also tried pasting different picture formats to see if one has a similar behavior but could not find anything with the formats I tried.
If I check the pictures folder in the documents .odt file, I can see two files:
A .png file, which is an empty picture, and a .svm file. I can open the png in paint, its containing the empty picture which seems to be put on the clipboard by LO (this is just my impression).
The actual bitmap seems to be within the .svm file. I can not open it with normal image viewers but if I drag it on a new Writer document the image is added correctly.
When dragging the .svm into a new document, Writer will do the same as before when the file is saved: it creates a empty .png with the right frame size and store the bitmap in a .svm in the pictures folder.
Has anyone maybe seen something similar? Thank you!
No.
Try a newer LibreOffice Version.
Thanks for your reply. I just tried LO 24.8.0.3 and its the same.
Have you inserted a new image in LibreOffice bevor?
Please name the operating system you are using and upload a sample file with the problem here. Thank you.
I am on Windows 11. I copied the image causing issues from an existing document to a new one with the new LO version. I saved the new document and tried to copy the image further into paint. It copies fine between LO, but not to another application. That means my first assumption it only puts an empty png on the clipboard is wrong, the image data must be there but somewhat not readable for paint. LO somehow handles it differently. Maybe svm is put on the clipboard and the png as well and paint will just grab the png part. As said, the image seems to be within the svm, as when I drag only the png in LO, it also appears as an empty image, while the svm works. I should be able to debug the Clipboard content from LO, so I will try that.
The problem with uploading an example file is that I need to ask for permission. Those images do not belong to me so I can not just publish them. I will try to get an example which I am allowed to post but that may take a while. Since the issue is not known, when I create a reproducible example, I could directly create a bug report?!
Is there any information when LO would create a svm file? I don’t know that format and when I normally copy images into LO, this kind of file seems not to appear, not sure if that would be some helpful information.
Yes.
Is there any information when LO would create a svm file?
I don’t think it’s because of LO, since you are pasting from the cache.
According to SVM File - What is an .svm file and how do I open it? an svm file is similar to wmf, so it can contain vector, bitmap or other types. You might be best to select the picture and export as png (or wmf?) if you wanted to open it in Paint. It would be better to go back to the original graphics application to modify the picture however.
Can you Insert - Image instead of pasting into LibreOffice? Or was that how it was inserted originally?
I installed 24.8 on a notebook where I did not test this before, I did not want to change my current main installation. The image was only copied from the existing file to a new one within LO, for the first time on this machine. Then into paint. So every cache should only come from LO. I’ll try to get an example, thanks for your help!
Thanks for that link about SVM, that is very interesting. I may be able to create an example with Draw, lets see. I tried export as WMF, is it is described as similar, so far but it behaves as expected, I can paste it outside of LO. I’ll try further.
If I insert - Image, that asks for a file, so it should be the same as when I drag and drop an image into writer, no? That behaves as described above: I can extract the png and svm from the original file and drag it into a new document. The png will be an empty frame, the svm will appear like the original picture, but can not be used further via c&p. Maybe export would work, not sure where to find that option, but then just using a screenshot tool seems faster.
The original was inserted via copy and paste from Phoenix.
Probably the issue at this point already, in 7.1 the inserted pictures did not have the issue and I just tried with older files, created by LO 7.1, the picture there can still be pasted out of LO, also in 7.6 and 24.8. So something probably goes wrong on the first paste from Phoenix to LO.
As I don’t have Phoenix, I can not test this in 24.8 myself, I will ask the person who gave me the file with the picture to update and see if the issue is gone then and 24.8 will save the file correctly.
Also there is a difference between 7.6.5.2 and 24.8 when I use the “edit with external tool” option, if you mean that with export. In 24.8 the windows preview tool actually gets the picture, in 7.6, it opens an empty picture as well. That’s already something and looks promising. Thanks everyone!
The second entry in this question gives three methods of exporting images from Phoenix, it might be worth a look. I suppose export as Word would export images as wmf, see Outputting JPEG/PNG plots at once - Phoenix WNL basics - Certara Forums
I have some more infos in this case here. I found when I copy an image which causes issues to Draw, from there I can copy it into MS Paint. I can also copy it back from Draw to Writer, and then it works as expected also in Writer, as I can also copy it further into paint without issues then. The interesting part is, that no new image is in the .odt pictures folder despite showing two images where for one c&p works, for the other one not. The same svm file is referenced twice in the content.xml with different styles. One of them (fr1) contains
style:parent-style-name=“Graphics”
<style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
<style:graphic-properties style:mirror="none" fo:clip="rect(0in, 0in, 0in, 0in)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
</style:style>
...
<style:style style:name="gr2" style:family="graphic" >
<style:graphic-properties draw:stroke="none" svg:stroke-width="0in" svg:stroke-color="#3465a4" draw:marker-start="" draw:marker-start-width="0.0783in" draw:marker-start-center="false" draw:marker-end="" draw:marker-end-width="0.0783in" draw:marker-end-center="false" draw:fill="none" draw:fill-color="#729fcf" draw:textarea-horizontal-align="center" draw:textarea-vertical-align="middle" fo:padding-top="0.0492in" fo:padding-bottom="0.0492in" fo:padding-left="0.0984in" fo:padding-right="0.0984in" fo:wrap-option="wrap" draw:shadow="hidden" draw:shadow-offset-x="0.0783in" draw:shadow-offset-y="0.0783in" draw:shadow-color="#808080" draw:color-mode="standard" draw:luminance="0%" draw:contrast="0%" draw:gamma="100%" draw:red="0%" draw:green="0%" draw:blue="0%" fo:clip="rect(0in, 0in, 0in, 0in)" draw:image-opacity="100%" style:mirror="none" loext:decorative="false" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/>
</style:style>
Style fr1 and gr2 are used, I removed gr1.
The drawing objects:
<text:p text:style-name="Standard">
<draw:frame text:anchor-type="paragraph" draw:z-index="1" draw:name="Metafile 1" draw:style-name="gr2" draw:text-style-name="P1" svg:width="7.4803in" svg:height="4.313in" svg:x="0.0008in" svg:y="3.9925in">
<draw:image xlink:href="Pictures/20000009000196780000EA5CBEA5915F.svm" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:mime-type="image/x-svm">
<text:p/>
</draw:image>
<draw:image xlink:href="Pictures/10000001000008010000049EB82B5F58.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:mime-type="image/png"/>
</draw:frame>
<draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="char" svg:width="6.9252in" svg:height="3.9925in" draw:z-index="0">
<draw:image xlink:href="Pictures/20000009000196780000EA5CBEA5915F.svm" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:mime-type="image/x-svm"/>
<draw:image xlink:href="Pictures/10000001000008010000049EB82B5F58.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:mime-type="image/png"/>
</draw:frame>
</text:p>
When I remove style:parent-style-name=“Graphics” from fr1, everything works as expected. When I put it to the other style (gr2), then the other image has the issue. So I can toggle which image has the issue via editing the style. It also works without draw, when only manually the parent-style-name is removed from contents.xml in a new file.
It seems when I past the image back into Writer from Draw, the parent-style-name is not set. But it is set when the image was originally pasted from Phoenix. And it is also set when I drag the svm file directly into Writer, or paste it with paste special.
Writer is also smart enough to realize its the same file, but handles it differently according to how it was inserted. When Debugging, via java addin which listens to paste events, I see one additional DataFlavor delivered when the image is pasted from Draw or from an instance in Writer where the style has no parent-style name. The additional DataFlavor is Drawing Format.
application/x-openoffice-drawing;windows_formatname="Drawing Format"
It seems to make the difference.
I was testing on LO 2024.8.3 today.
And hopefully I should be able to provide at least a svm file as example to reproduce soon. Sorry for being slow in that regard, I was promised that I should get an example this week. Its really only the dataformat from phoenix, when I create an svm file in open office (which still allows to save in that format) everything works fine.
Once i have an example, I guess I open a bug report directly?!
Since it clearly can work, the svm file itself is not the issue, but apparently the style. Something in the file analysis seems different in Draw, causing it to be handled correctly afterwards also in Writer, so it should in theory be possible to be handled right without Draw, or am I wrong here?
Btw. it seems not possible to use another style on the image from the graphic styles bar in writer, I tried them all. I also tried creating a new style without parent style, but it did not work either.