Programmatically Adding SVG
Fri, 29 Apr 2016 - 8:39 PM
Hi all,
I am new to LibreOffice and need to make an extension in Java that will create an SVG string. I would then like to be able to use that SVG string in LibreOffice to render an image in either Write or Impress. I’ve seen the UNO example for adding a GIF or JPG, but what about SVG as a string? What APIs should I be looking at?
Thanks!
Mon, 02 May 2016 - 5:48 PM
#1
Hi,
not sure if this may be
Hi,
not sure if this may be useful: I don’t have any Java experience but you can have a look at the Basic code of the extension “PicInfoFrames” which does create a text file, saved to disk as SVG and inserted as image in Writer.
Be aware: The code uses a text file save method that can’t create UTF-8 characters so it converts characters to Ascii. There is another method but I don’t remember it now and I believe if you use Java then you don’t have to worry anyway.
Here’s the extension:
http://extensions.libreoffice.org/extension-center/replace-images-with-information-frames-showing-name-and-filename-picinfoframes