15

I'm trying to export a reasonably complex illustration from Inkscape into a Libreoffice Writer document. I'd like to avoid rasterizing the illustration as much as possible.

So far I've tried the following:

  • Inkscape SVG, Plain SVG, SVG with everything converted to paths: bitmaps images included in my illustration are rendered as black boxes in the writer document.
  • EPS: fonts look ugly
  • ODG: not recognized in Writer (?!)

For now I've exported my SVG drawing to PNG, and it works fine, but it's not very satisfying. So what's the correct way to do this? Any input welcome!

ThatGuy
  • 486
Peltier
  • 6,504

4 Answers4

2

Exporting from Inkscape using the png image format which Libreoffice fully supports, rather than saving in vectorial format which it does not support, is actually the only option.

See in Inkscape Wiki : Save as vs export.

However, the thread How to import SVG in OOo Writer says :

The svg import will be new feature in OOo 3.4, try OOo 3.4 beta from OOo download site.

This is about OpenOffice, of which Libreoffice is actually another branch.
You might consider changing because of this feature, until it finds its way into Libreoffice.

harrymc
  • 498,455
1

A while later

(as tested today), inserting Inkscape (0.92.3) SVGs proved possible in LibreOffice 6.0.6. This may be only a partial support but seemed sufficient for making a user's manual. I successfully did the following:

Inkscape

  • Start new SVG image
  • drag 'n' drop a PNG-Screenshot on it (open in Inkscape)
  • place and a semi-transparent rectangular box with colored text on the screenshot
  • draw a horizontal line under the text
  • added an arrow starting in the middle of the line pointing on a control on scrrenshot

LibreOffice

  • Start a new text document
  • added a page full of text
  • Insert > Image... (selected image from description above)
  • Saved the document
  • Exported as PDF

Concluscion

I doubt that successfully using Inkscape SVGs within LibreOffice alone will make you very happy. Probably it's only for an intermediate stage. Whether you are interested in producing PDF documents, or HTML documents or paper documents (printed from LibreOffice) can make a big difference. So for example, fonts will matter.

Wolf
  • 416
0

TL-DR:

If possible, convert your SVG to PDF (or eps) in Inkscape, then open that in GIMP and convert to a very high-resolution PNG without anti-alias (prints better), then embed that in your document. Because vector graphics support is a nightmare.

The long story:

Vector graphics support in Libreoffice is a very lively story ... at the time this question was asked, the only reliably supported format was eps. However, Libreoffice could not display it properly, only print to postscript printers (most network printers in professional environments) and convert to PDF!

The reason is that eps is already a postscript format, and the PDF conversion was based on "printing" to a Postscript file, then converting to PDF. Libreoffice simply passed the EPS images through, and in print they looked exactly as they should, although LO could only display a low-res preview.

A little later, around 2012, Libreoffice was, for a short time, able to correctly dspay and print SVG graphics! This relied on an installation of Inkscape on the same machine (or at least the cairo library that comes with it). The feature included all the fancy SVG features like transparency, gradients and blur(!). I used this to great effect in one single presentation in early 2013, and at that point I thought I had it all figured out.

At that point, someone in the LO community started thinking that "SVG embedding" is the same as "SVG import", and so, when inserting an SVG, Libreoffice started trying to interpret the file and convert it to a libreoffice drawing. That cannot work if the svg uses blur, for example, but in practice it also failed in lots of other scenarios, and this ruined several of my documents.

By now, Libreoffice has developed still a bit further, and at least simple svg images work nicely again. So as long as you have no gradients, transparency or blur, you should be fine with SVG. At the same time, something has happened to the EPS embedding, and they have started to look wrong in some cases.

Finally, there are more vector formats, like WMF and EMF. They can work nicely, but only if your document stays on the same computer. I've had several documents where fonts embedded in an EMF were completely mangled (or not), depending on what machine you were looking at the image.

... needless to say, I find this deeply frustrating, but it's still much better than Microsoft Office. To my knowledge, no vector graphics formats work on MS office at the moment (including Microsoft's own WMF and EMF), except the stuff you draw directly in the software, as it is for LO.

At this point, I've pretty much given up hope that SVG will ever be properly usable in anything but Inkscape itself and web browsers.

Zak
  • 209
0

What worked for me was in Inkscape to select the SVG - a black and white electric circuit - from my PDF and Export PNG Image. Then in LO Writer I used Insert Image. Inkscape version 0.92, Libre Office Version 6.0.7.3 Mac High Sierra 10.13.6

Joerg
  • 1