Programmatically Adding SVG

1 reply [Last post]
primesoftware
Offline
Last seen: 4 weeks 1 day ago
Title:
Joined: 29 Apr 2016
Posts: 1
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!

musikai
Offline
Last seen: 6 hours 33 min ago
Title: ★★★
Joined: 25 Oct 2015
Posts: 35
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
Windows7 Pro, Lubuntu 15.04, Sibelius 7.1.3, LibreOffice 4.4.7, OpenOffice 4.1.2 Free Project: LibreOffice Songbook Architect (LOSA) http://struckkai.blogspot.de/2015/04/libreofficesongbookarchitect.html SVG-Tools: http://struckkai.blogspot.com/2016/0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.