How to import SVG in OOo Writer

Discussions about using 3rd party extension with OpenOffice.org

How to import SVG in OOo Writer

Postby robert kessler » Fri Nov 26, 2010 12:23 pm

Hello,

I try to import SVG vector drawings in oowriter:

This is my svg file:

Code: Select all   Expand viewCollapse view
<?xml version="1.0" encoding="utf-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">

<g transform="scale(10) translate(298,110)" font-family="Verdana, sans-serif">
<path d="M -270 -107.5 L -280 -107.5 z" stroke="SandyBrown" stroke-width="0.1" />
<path d="M -270 -105 L -280 -105 z" stroke="SandyBrown" stroke-width="0.1" />
<path d="M -270 -100 L -280 -100 z" stroke="SandyBrown" stroke-width="0.1" />
<path d="M -270 -97.5 L -280 -97.5 z" stroke="SandyBrown" stroke-width="0.1" />
<path d="M -255 -102.5 L -245 -102.5 z" stroke="SandyBrown" stroke-width="0.1" />
<text x="-264.375" y="-101.925" text-anchor="middle" font-family="Monospace" font-size="2.3" >I$5417 </text>
<text x="-262.5" y="-106.75" text-anchor="middle" font-family="Monospace" font-size="3" >NO04 </text>
<text x="-239.7461" y="-101.4979"  font-family="Monospace" font-size="3.8" >OQ </text>
<text x="-285.1992" y="-106.5422" text-anchor="end" font-family="Monospace" font-size="3.8" >IA </text>
<text x="-285.1992" y="-104.0422" text-anchor="end" font-family="Monospace" font-size="3.8" >IB </text>
<text x="-285.1992" y="-99.0422" text-anchor="end" font-family="Monospace" font-size="3.8" >IC </text>
<text x="-285.1992" y="-96.5422" text-anchor="end" font-family="Monospace" font-size="3.8" >ID </text>
<path d="M -258.001 -102.5 A 7.895 7.895 0 0 0 -264.333 -106.5" fill="none" stroke="Cyan" stroke-width="0.1" />
<path d="M -264.333 -106.5 L -268.5 -106.5 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -268 -105 L -270 -105 z" stroke="Cyan" stroke-width="0.1" />
<circle cx="-257.251" cy="-102.5" r="0.751" fill="none" stroke="Cyan" stroke-width="0.1" />
<path d="M -256.5 -102.5 L -255 -102.5 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -270 -107.5 L -268.5 -107.5 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -268.5 -106.5 L -268.5 -108.5 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -270 -97.5 L -268.5 -97.5 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -268 -100 L -270 -100 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -268.5 -98.5 L -268.5 -96.5 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -268.5 -98.5 A 8.5 8.5 0 0 0 -268.5 -106.5" fill="none" stroke="Cyan" stroke-width="0.1" />
<path d="M -268.5 -98.5 L -264.333 -98.5 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -264.333 -98.5 A 7.895 7.895 0 0 0 -258.001 -102.5" fill="none" stroke="Cyan" stroke-width="0.1" />
<path d="M -245 -102.5 L -242.5 -103.75 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -240 -103.75 L -242.5 -103.75 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -245 -102.5 L -242.5 -101.25 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -240 -101.25 L -242.5 -101.25 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -240 -101.25 L -240 -103.75 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -280 -107.5 L -282.5 -108.75 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -285 -108.75 L -282.5 -108.75 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -280 -107.5 L -282.5 -106.25 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -285 -106.25 L -282.5 -106.25 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -285 -106.25 L -285 -108.75 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -280 -105 L -282.5 -106.25 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -285 -106.25 L -282.5 -106.25 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -280 -105 L -282.5 -103.75 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -285 -103.75 L -282.5 -103.75 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -285 -103.75 L -285 -106.25 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -280 -100 L -282.5 -101.25 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -285 -101.25 L -282.5 -101.25 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -280 -100 L -282.5 -98.75 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -285 -98.75 L -282.5 -98.75 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -285 -98.75 L -285 -101.25 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -280 -97.5 L -282.5 -98.75 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -285 -98.75 L -282.5 -98.75 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -280 -97.5 L -282.5 -96.25 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -285 -96.25 L -282.5 -96.25 z" stroke="Cyan" stroke-width="0.1" />
<path d="M -285 -96.25 L -285 -98.75 z" stroke="Cyan" stroke-width="0.1" />
</g>

</svg>

In inkscape it is displayed pretty good, see attachment nor4.png,

If I do oodraw file.svg, the objext is only displayed in black and the texts are missing, see attachment oodraw_nor4.png

If I do a Insert Picture from file the result is as in attachment oowriter_nor4.png,

What do I wrong? Is there a chance, that the display and print results are the
same in inkscape and oowriter?
Also I dont understand the role of the module svg-import-1.2.2.oxt, after installing this nothing has changed.
nor4.png
display in inkscape
nor4.png (4.97 KiB) Viewed 9614 times


I would be glad I if would get some help or some information, why this is not so easy.

Best regards Robert
Attachments
oowriter_nor4.png
display in oowriter
oowriter_nor4.png (7.07 KiB) Viewed 9614 times
oodraw_nor4.png
display in oodraw
oodraw_nor4.png (6.76 KiB) Viewed 9614 times
Mainly because of the problems of SVG Import I do this
OpenOffice.org 3.1 310m21(Build:9319)
Suse Linux 11.2 kernel 2.6.31.12-0.2-default
robert kessler
 
Posts: 2
Joined: Fri Nov 26, 2010 11:46 am

Re: How to import SVG in OOo Writer

Postby Villeroy » Fri Nov 26, 2010 3:40 pm

SVG is not supported by the vanilla compilation of OOo from http://openoffice.org. It has been added to several derivates though. I would consider this feature as experimental, not yeat finished, broken, you name it.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28666
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to import SVG in OOo Writer

Postby robert kessler » Tue Dec 07, 2010 11:59 am

My question has been only if I make something wrong or if the performance is only thus as it is
and I can not improve something, because there is only a reduced count of objects ready for SVG...
Apperently something of SVG can be understood by oowriter, but not the complete stuff and
at all no text.
But I dont know about the limitations of SVG import in oowriter, and I hoped anybody could tell me
something about this.
I dont demand, that SVG import shall be perfect, because I know, that this is a difficult topic
because the complete SVG language is so huge.

Afterwards I found out that the EPS import in oowriter is much better and therefore the following
solution is sufficient for me:

Doing inkscape -E drawing.eps drawing.svg

and importing drawing.eps in oowriter shows satisfied results.
Mainly because of the problems of SVG Import I do this
OpenOffice.org 3.1 310m21(Build:9319)
Suse Linux 11.2 kernel 2.6.31.12-0.2-default
robert kessler
 
Posts: 2
Joined: Fri Nov 26, 2010 11:46 am

Re: How to import SVG in OOo Writer

Postby zab08 » Fri Apr 15, 2011 9:30 am

Excuse me. Now my question is same to yours.
I want to import my svg in OOo writer by java code .Now I can embedd OOo draw in OOo write.But I dont know how to import svg file in OOo write .
what about you to do with it?
Thank you very much!
OpenOffice 3.1 on Windows Vista / NeoOffice 2.2.3 with MacOS 10.4 / OpenOffice 2.4 on Ubuntu 9.04
zab08
 
Posts: 16
Joined: Fri Sep 10, 2010 3:25 am

Re: How to import SVG in OOo Writer

Postby r4zoli » Fri Apr 15, 2011 9:48 am

The svg import will be new feature in OOo 3.4, try OOo 3.4 beta from OOo download site.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
User avatar
r4zoli
Volunteer
 
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary


Return to Extensions

Who is online

Users browsing this forum: No registered users and 2 guests