SVG embedding in LibreOffice

Hi everyone,

I just realized that OpenOffice 3.4 finally has one of my most wished-for features, which is the embedding of SVG images. As images, including all the really cool features that SVG supports. I tried it, and it works fine.
now ... is that going to find its way into LibreOffice, too?

This is the feature I'm talking about:
http://openoffice.org/bugzilla/show_bug.cgi?id=49991

Especially in the light of the not-quite-ideal support of other vector image formats, I think there should be at least one that works always correctly and reliably.

On a related note: Is there some sort of "wishlist" or "requested features" list, or are those also the bug list? I was originally hoping I didn't have to ask here to find out what the matter with SVGs is.

Cheers,

  Zak

Actually I am almost sure LibreOffice added that feature first

http://www.libreoffice.org/download/new-features-and-fixes/

I don't know if the code was shared with both projects but OpenOffice does
that too :slight_smile:

Hi :slight_smile:
I thought Svg was in the 3.3.0 release and has been improved on in subsequent
releases? Zak, have you had problems using Svg in LibreOffice?
Regards from
Tom :slight_smile:

From: Zak McKracken <zak_mckracken@openoffice.org>
To: users@libreoffice.org
Sent: Tue, 7 June, 2011 0:53:13
Subject: [libreoffice-users] SVG embedding in LibreOffice

Hi everyone,

I just realized that OpenOffice 3.4 finally has one of my most wished-for
features, which is the embedding of SVG images. As images, including all the
really cool features that SVG supports. I tried it, and it works fine.
now ... is that going to find its way into LibreOffice, too?

This is the feature I'm talking about:
http://openoffice.org/bugzilla/show_bug.cgi?id=49991

Especially in the light of the not-quite-ideal support of other vector image
formats, I think there should be at least one that works always correctly and
reliably.

On a related note: Is there some sort of "wishlist" or "requested features"
list, or are those also the bug list? I was originally hoping I didn't have to
ask here to find out what the matter with SVGs is.

Cheers,

Zak

--Unsubscribe instructions: E-mail to users+help@libreoffice.org
In case of problems unsubscribing, write to postmaster@documentfoundation.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/www/users/
All messages sent to this list will be publicly archived and cannot be

deleted

Hi :slight_smile:
I thought Svg was in the 3.3.0 release and has been improved on in subsequent
releases? Zak, have you had problems using Svg in LibreOffice?
Regards from
Tom :slight_smile:

I thought so too. I remember that because I do not need the SVG import extension any more. If it is not true, then I will have to add it. The key word to the question/comments is "embedded" I know that I can imbed other formats, like png and jpg, but I do not remember embedding svg.

I just tried inserting svg images. Some did not show properly, color turned to black only, while others seem to work OK. But it does not work as well as the standard file formats like gif, png, and jpg, for including a picture in a Writer document.

This is not the feature I was talking about, although it does sound similar. The difference is discussed at length in the OOo issue I linked to.

Short version: The LO feature is an import filter that tries to translate svgs into draw objects. Which is nice, but if you look close enough at the screenshot you see the difference: No blurring, only simple colour gradients and so on.
That's because draw can only do a small subset of the svg specification (which is completely okay, it's office software)

But for the purpose I'm talking about, this is not necessary, which is embedding. I can embed PNGs, JPGs, to a degree also vektor formats like EPS and EMF, but the latter are not always shown cleanly.
Now, since 3.4 beta, OOo can actually embed SVG images. So I can treat them just like any other image and not worry about scaling styles and/or fonts, and whether draw supports layered, blurred transparency gradients with variable linewidth.

I haven't got the developer version of LO, but the last release still tries to import SVGs, and I could not find any entry about the topic in the bug list.

   Zak

As described further above, these are two different features we're talking about.
Just try and make an SVG in Inkscape that uses blurring (or find one on the internet -- the Wikipedia entry to "SVG" has some), and then import it into LO 3.4 and into OOo 3.4 beta. You'll see the difference.

Actually there was much confusion in the OOo Issue tracker about this. Many feature requests for embedding were marked as duplicates of the conversion feature request, so it took all the way from 2003 until now to finally not only sort it out but also implement it, and I was waiting very impatiently.

I think there's a general problem with office software and vector graphics (not just in Open/LibreOffice), and the only package that gets it completely right to my knowledge is LaTeX, even though that works only for EPS.

Regards,

    Zak

"Zak McKracken" <zak_mckracken@openoffice.org> writes:

Hi :slight_smile:
I thought Svg was in the 3.3.0 release and has been improved on in
subsequent
releases? Zak, have you had problems using Svg in LibreOffice?

As described further above, these are two different features we're
talking about.
Just try and make an SVG in Inkscape that uses blurring (or find one
on the internet -- the Wikipedia entry to "SVG" has some), and then
import it into LO 3.4 and into OOo 3.4 beta. You'll see the
difference.

Like this one?

http://upload.wikimedia.org/wikipedia/commons/9/91/Arrows_bend.svg

So if I understand you correctly, the blurred shadow is correctly
imported in OOo.

And here,

  LibreOffice 3.3.2
  OOO330m19 (Build:202)
  tag libreoffice-3.3.2.2

I get an unblurred arrow as the shadow.

Actually there was much confusion in the OOo Issue tracker about
this. Many feature requests for embedding were marked as duplicates of
the conversion feature request, so it took all the way from 2003
until now to finally not only sort it out but also implement it, and
I was waiting very impatiently.

Ouch.

So it sounds like a good improvement, I wonder if it will be used in
LibO. (It should be [legally] possible, unless they've already changed
their license, right?)

I think there's a general problem with office software and vector
graphics (not just in Open/LibreOffice), and the only package that
gets it completely right to my knowledge is LaTeX, even though that
works only for EPS.

It is. Other examples: IIRC, MS Word (dunno about SVG support, but I
doubt it has any), apart from the Windows and Enhanced MetaFile formats,
only supports enhanced postscript, in the same way OOo and LibO do
(actual rendering is relayed to printing).

Someone trying to embed an EPS into MS Word:
http://help.lockergnome.com/office/Importing-eps-files-Word--ftopict699269.html

A list of supported formats and their limitations (in MS Word):
http://support.microsoft.com/kb/290362/en-us

Nuno J. Silva wrote:

Like this one?

http://upload.wikimedia.org/wikipedia/commons/9/91/Arrows_bend.svg

So if I understand you correctly, the blurred shadow is correctly
imported in OOo.

I can confirm that inserting the linked SVG into a OOo 3.4 Beta Writer
document does show up a blurred shadow (looks the same as opening the SVG in
Firefox or Inkscape)

http://upload.wikimedia.org/wikipedia/commons/9/91/Arrows_bend.svg

So if I understand you correctly, the blurred shadow is correctly
imported in OOo.

And here,

  LibreOffice 3.3.2
  OOO330m19 (Build:202)
  tag libreoffice-3.3.2.2

I get an unblurred arrow as the shadow.

Yes, that's it. I tested it under Windows XP, and it worked just fine.

So it sounds like a good improvement, I wonder if it will be used in
LibO. (It should be [legally] possible, unless they've already changed
their license, right?)

According to the comments in the OOo Issue tracker it wasn't even very hard to do, although I cannot be the judge of that. But I guess there must be some GPL libraries out there that will do most of the work.

I think there's a general problem with office software and vector
graphics (not just in Open/LibreOffice), and the only package that
gets it completely right to my knowledge is LaTeX, even though that
works only for EPS.

It is. Other examples: IIRC, MS Word (dunno about SVG support, but I
doubt it has any), apart from the Windows and Enhanced MetaFile formats,
only supports enhanced postscript, in the same way OOo and LibO do
(actual rendering is relayed to printing).

Someone trying to embed an EPS into MS Word:
http://help.lockergnome.com/office/Importing-eps-files-Word--ftopict699269.html

A list of supported formats and their limitations (in MS Word):
http://support.microsoft.com/kb/290362/en-us

Oh, that's just great! The Microsoft website detects that I am running Linux and kindly disables the complete article, because it is not relevant for me. Way to go, guys! Good that my browser can just mask itself :slight_smile:

Interesting to see that MS Word has the same problem with EPS as OOo. Only prints right on PS printers, otherwise only a preview image. I wonder if this is a principal problem with EPS, or whether OOo more or less copied the behaviour from word simply because it's easier to implement. I circumvent the Problem by printing to file, then using ps2pdf and then printing the PDF file wherever I want, but the downside is that ps2pdf automatically turns raster graphics into JPGs and reduces the resolution, so while keeping my EPS graphics alive it will reduce the printing quality of non-vector graphics, and this when the whole point was to get a good printing quality!
(Does anyone know a way to keep that from happening? the OO-internal pdf converter is even worse on embedded eps, but can preserve the raster images)

Zak

Small error: The SVG embedding isue has been open since May 2005, not 2003.

Which version did you try? I've tried both:
http://download.openoffice.org/next/other.html#dev2
and
http://download.openoffice.org/all_beta.html
(linux Intel DEB)
and on both I get 'Graphics filter note found' when attempting to import
an SVG (Writer, Draw, Impress).

Hi :slight_smile:
In OpenOffice and LibreOffice the Export to Pdf option allows you to choose
"lossless" compression or change the percentage of jpg compression.
Regards from
Tom :slight_smile:

Hi Zak.

Hi :slight_smile:
In OpenOffice and LibreOffice the Export to Pdf option allows you to choose
"lossless" compression or change the percentage of jpg compression.
Regards from
Tom :slight_smile:

________________________________
From: Zak McKracken<zak_mckracken@openoffice.org>
To: users@libreoffice.org
Sent: Wed, 8 June, 2011 2:43:03
Subject: [libreoffice-users] Re: Re: SVG embedding in LibreOffice

http://upload.wikimedia.org/wikipedia/commons/9/91/Arrows_bend.svg

So if I understand you correctly, the blurred shadow is correctly
imported in OOo.

And here,

   LibreOffice 3.3.2
   OOO330m19 (Build:202)
   tag libreoffice-3.3.2.2

I get an unblurred arrow as the shadow.

Yes, that's it. I tested it under Windows XP, and it worked just fine.

So it sounds like a good improvement, I wonder if it will be used in
LibO. (It should be [legally] possible, unless they've already changed
their license, right?)

According to the comments in the OOo Issue tracker it wasn't even very hard to
do, although I cannot be the judge of that. But I guess there must be some GPL
libraries out there that will do most of the work.

I think there's a general problem with office software and vector
graphics (not just in Open/LibreOffice), and the only package that
gets it completely right to my knowledge is LaTeX, even though that
works only for EPS.

It is. Other examples: IIRC, MS Word (dunno about SVG support, but I
doubt it has any), apart from the Windows and Enhanced MetaFile formats,
only supports enhanced postscript, in the same way OOo and LibO do
(actual rendering is relayed to printing).

Someone trying to embed an EPS into MS Word:

http://help.lockergnome.com/office/Importing-eps-files-Word--ftopict699269.html

A list of supported formats and their limitations (in MS Word):
http://support.microsoft.com/kb/290362/en-us

Oh, that's just great! The Microsoft website detects that I am running Linux and
kindly disables the complete article, because it is not relevant for me. Way to
go, guys! Good that my browser can just mask itself :slight_smile:

Interesting to see that MS Word has the same problem with EPS as OOo. Only
prints right on PS printers, otherwise only a preview image. I wonder if this is
a principal problem with EPS, or whether OOo more or less copied the behaviour
from word simply because it's easier to implement. I circumvent the Problem by
printing to file, then using ps2pdf and then printing the PDF file wherever I
want, but the downside is that ps2pdf automatically turns raster graphics into
JPGs and reduces the resolution, so while keeping my EPS graphics alive it will
reduce the printing quality of non-vector graphics, and this when the whole
point was to get a good printing quality!
(Does anyone know a way to keep that from happening? the OO-internal pdf
converter is even worse on embedded eps, but can preserve the raster images)

Zak

--Unsubscribe instructions: E-mail to users+help@libreoffice.org
In case of problems unsubscribing, write to postmaster@documentfoundation.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/www/users/
All messages sent to this list will be publicly archived and cannot be deleted

OO and LO print EPS correctly for me to non-eps printers (my epson C87), printing the vector graphics cleanly. Mac and Linux, both use CUPS as the print engine. Are you printing from Linux, what printer driver are you using.
steve

Zak.

>
> http://upload.wikimedia.org/wikipedia/commons/9/91/Arrows_bend.svg
>
> So if I understand you correctly, the blurred shadow is correctly
> imported in OOo.
>
> And here,
>
> LibreOffice 3.3.2
> OOO330m19 (Build:202)
> tag libreoffice-3.3.2.2
>
> I get an unblurred arrow as the shadow.

Yes, that's it. I tested it under Windows XP, and it worked just fine.
> So it sounds like a good improvement, I wonder if it will be used in
> LibO. (It should be [legally] possible, unless they've already changed
> their license, right?)

According to the comments in the OOo Issue tracker it wasn't even very
hard to do, although I cannot be the judge of that. But I guess there must
be some GPL libraries out there that will do most of the work.

>> I think there's a general problem with office software and vector
>> graphics (not just in Open/LibreOffice), and the only package that
>> gets it completely right to my knowledge is LaTeX, even though that
>> works only for EPS.
>
> It is. Other examples: IIRC, MS Word (dunno about SVG support, but I
> doubt it has any), apart from the Windows and Enhanced MetaFile formats,
> only supports enhanced postscript, in the same way OOo and LibO do
> (actual rendering is relayed to printing).
>
> Someone trying to embed an EPS into MS Word:
> http://help.lockergnome.com/office/Importing-eps-files-Word--ftopict699269.html

> A list of supported formats and their limitations (in MS Word):
> http://support.microsoft.com/kb/290362/en-us

Oh, that's just great! The Microsoft website detects that I am running
Linux and kindly disables the complete article, because it is not relevant
for me. Way to go, guys! Good that my browser can just mask itself :slight_smile:

   I was able to both pages without any problems using Linux and Opera.
I have not had major problems with microsoft.com in Linux when I had to
visit it

Yes, but that applies only to raster graphics, not to vector formats. With EPS images, only the preview image will be dumped in the pdf.
To summarize: The built-in pdf export preserves my raster graphics but kill EPS images (for me at least. Some people apparently have very hires preview images inther EPSs). printing it .ps file and using ps2pdf will preserve the EPS images and reduce the raster images.
This behaviour has not changed since OOo 1.0

Zak

Hi everyone,

I just realized that OpenOffice 3.4 finally has one of my most wished-for
features, which is the embedding of SVG images. As images, including all
the really cool features that SVG supports. I tried it, and it works fine.
now ... is that going to find its way into LibreOffice, too?

Which version did you try? I've tried both:
http://download.openoffice.org/next/other.html#dev2
and
http://download.openoffice.org/all_beta.html
(linux Intel DEB)

The latter one, 3.4 beta1. But I tested it only on Windows XP.

and on both I get 'Graphics filter note found' when attempting to import
an SVG (Writer, Draw, Impress).

Did you use "File -> import", or did you try "Insert -> image -> from file"? I'm talking about the latter one, since it is about using it as an image, not importing it as editable drawing.

   Zak

Very strange, for me they definitely do not print correctly.
I'm printing from my Windows XP PC to a Canon iP5000, and all I get is the same as in the PDF export, which is the eps preview image.
This may have to do with how the preview looks like, maybe? Some EPS files have a very hi-res preview, and as I just learned from Microsoft, Word creates one of its own. I usually add a very low-res preview to the EPS at creation. I've attached an example with a very coarse preview (and a SVG version for comparison).
I'm very curious if you can
- print it directly from LO to a non-eps printer, and
- convert it to pdf
while getting the full verctor graphics goodness out of it.
You should be able to zoom fairly far in, and you should also be able to see the different thicknesses of the coloured curves versus the hairline tangential lines.
If I even just put them into a writer document, it looks pretty ridiculous already, and the pdf looks just as bad.

I think this should clearly show the use of having a properly embeddable and printable vector image format.

   Zak

I just inserted the arrow.svg into a ODS using OOo 3.4 Beta.

The interesting results are:
1) Opening the ODS in LibreOffice shows the blur (while if I insert the svg
in LO it won't)
2) Exporting to PDF has higher quality in LO than OOo

Hi. This might be a windows bug (just the way windows prints, and always
has).
The bitmap image with an EPS with vector art is like a preview.
Sometimes I don't even create a preview with my EPSs, just position the
frame (empty on screen). Printing has worked fine for years in OO and
now LO on linux and mac.
The great thing about LO on the mac is that LO displays the actual
vector art of an EPS, even when there is no preview.
Wonder if you can install CUPS for windows.
steve

It is also an issue in impress, where there is no printing involved.
EPS images don't show up, SVG images tend to be horribly broken.

-Todd