EMF rasterization in writer and draw

Hello,
I’m using Fedora 38, LO version 7.6.03
Is there any way to avoid rasterization of figures in emf format for writer and draw?
The exported PDF looks fine, but it’d be great if there’s a way around it.
I know there is some environment variable for PDFIMPORT_RESOLUTION_DPI. Is there something like that for other formats?
(emf format is the only format I could get to best results)

I attached both files, one is the original emf appended with odt extension, and the writer file containing the image.


Test.odt (25.0 KB)
Test.emf.odt (12.5 KB)
Thanks!

Please have a look at (LibreOffice Version 7.6:

https://wiki.documentfoundation.org/ReleaseNotes/7.6#EMF/EMF+


Please edit your question (= modify it; don’t add a comment so that all information is at the same location) to mention OS name, LO version and save format. Attach a sample EMF file so that wa can experiment.

Unfortunately, the system doesn’t allow me to upload emf file. Not supported.

Trick the Discourse engine used on this site: add extension .odt to your file name so that it looks like xxx.emf.odt and attach it.

Interesting! That worked!

I’m under Fedora 38 too but I chose KDE Plasma desktop (this may be different from yours where you perhaps have the GNOME default). My LO is from the distro, i.e. 7.5.5.2. Everything is as expected here where your EMF image displays correctly at any zoom level. I also scaled the image and again no rasterisation.

Check package libreoffice-graphicfilter is installed.

It may be the image file contains 2 versions of the image: one in bitmap format as a fallback in case an application doesn’t understand EMF, one in EMF.

I’m using Gnome.
I just installed the package. Still the same.
On windows 10 in my gnome box, there is no rasterization though.

Since distro level is 7.5.5.2, you probably installed 7.6.0.3 from some other source. Then the filters and other modules are not taken from standard distro locations but from some “custom” location. This is where you should look for the graphic filter. But, custom installs are not “packaged”, so you must find by yourself what to install and where.

I installed it through flatpak. I thought it would be just all the same from flathub.
I’ll look into that.

I am quite puzzled by this.
Not just emf format causes that, svg also does (the system still won’t let me upload svg even with .odt extension).
I saved it in the test.odt file.
test.odt (39.9 KB)

I used the LO provided from Fedora, flatpak, and directly from LO too. All of them do give the blurry image, especially the one in the background.

This does not happen on windows, though.

Your .odt file looks apparently OK here.
I had a look at the contents of your sample file: there are two versions of your images, svg + png. If the svg filter is not installed, Writer falls back to PNG which is a bitmap format and this results in pixelisation and blur if anti-aliasing is enabled.

Have you installed package libreoffice-graphicfilter which makes handling of SVG possible?

Yes I have installed it.

Package libreoffice-graphicfilter-1:7.5.6.2-1.fc38.x86_64 is already installed.

I guess maybe it’s gnome related.

Is the screenshot above supposed to be “correct”? The grey drawing have non-continuous strokes compared to the black ones. The grey molecule skeletons become blurry when I enlarge the screenshot (but not the black ones). In Writer, even at 600% zoom magnification your drawings are very neat, apart from small scratches as if you used an eraser on some lines.

The screenshot was a bit blurry, particularly the grey one.
This one is probably a better illustration:
image

test3.odt (86.7 KB)

And again, test3.odt is “perfect” on my computer, crisp images both gray and black. I suspect something wrong in your computer configuration. But, as already mentioned, my LO is 7.5.6.2 (upgraded last weeks), not the 7.6 series.
I emphasise the fact the package libreoffice-graphicfilter will install in the “standard” Fedora locations. They are probably different from those needed by FlatPak. It may happen that the package is not present in FlatPak and FlatPak Writer won’t look for filters in the “standard” locations.

Hi,
I just removed everything and reinstalled from fedora registry.
also reinstalled libreoffice-graphicfilter.
Same results.

I also noticed whenever I scrolled past the figure, it was laggy.
:disappointed_relieved::disappointed_relieved::disappointed_relieved:

Version: 7.5.5.2 (X86_64)
Build ID: 50(Build:2)
CPU threads: 12; OS: Linux 6.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Are you sure you’re up-to-date? You still advertise 7.5.5.2 while I am at 7.5.6.2. Have you intentionally downgraded LO? This is possible with dnfdragora. I don’t know for Discover because I don’t use it.

It seems like the suite is 7.5.5.2
I installed just the writer again.
Same results.

Version: 7.5.6.2 (X86_64)
Build ID: 50(Build:2)
CPU threads: 12; OS: Linux 6.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded