Supporting SVG as Image Format

The Scalable Vector Graphics format has been around for quite a while. The first specification was released in 2001, and meanwhile all browsers offer solid support for SVG. During the years, we've received a couple of requests to support SVG in List & Label. Initially, I was hoping for Microsoft to make SVG rendering support a Windows feature that we could just use. However, that hasn't happened so far. And so we had to come up with a different solution.

Enter the excellent Delphi SVG library written by Bruno Verhue. We’ve managed to agree on licensing terms that allowed us to make SVG rendering finally happen in List & Label. Usage is absolutely straightforward – if you add a new image to your report, SVG is available just like all the other formats:

Of course, you can also use the usual Drawing() designer function to just pass a path via formula.

As SVG features some rather complex filters, a 1:1 translation to EMF (which is our current base format) is not really feasible as the result wouldn’t be too appealing. Thus, the library generates a raster format in just the right size to make sure no unnecessary memory is used. Here’s an example what the result looks like:


Since most browsers already support the SVG format anyway, the SVG images are used directly 1:1 for HTML export without conversions

Related Posts

2 Comments on “Supporting SVG as Image Format”

  1. The rendering of SVG images into the output is terrible. They look like really low quality jpg images, all blurry and pixelated. Can you offer any advice please?

    Reply
  2. Hi Steve, probably this is caused by the images getting smoothed by GDI+. Will check the question and come back to you. It should be switchable via a code option.

    Reply

Leave a Comment