New version of Ab2d.ReaderSvg supports .Net CORE 3.1

by abenedik 23. December 2019 15:43

I am happy to inform you that a new version of Ab2d.ReaderSvg library is available.

As you can see from the title of this blog post, the Ab2d.ReaderSvg got the .Net CORE 3.1 support and has joined the 3D libraries that also support that.

What is more, this version of Ab2d.ReaderSvg got a new distribution method - it can be installed as a NuGet package from the standard NuGet repository.

The new version is still available as a windows installer (evaluation version can be downloaded from Downloads web page; commercial version can be downloaded from the Users Account web page). The version that is installed with windows installer uses the same licensing mechanism as before – using license.licx files or application license key.

But because the licensing with license.licx files does not work anymore for .Net CORE applications and also because this licensing was not very intuitive to use, the distribution that comes with NuGet uses a new, so called “universal”, licensing mechanism. There a single dll file is used for both evaluation and commercial usage. If the commercial license is not activated, then on first use of the library the user gets a dialog where he can start a 60-day evaluation. But if the user has a commercial license, he can activate it with calling SetLicense method – for example:

Ab2d.Licensing.ReaderSvg.LicenseHelper.SetLicense(licenseOwner: "[CompanyName]", 
                                                  licenseType: "[LicenseType]", 
                                                  license: "[LicenseText]");

This should be easier to setup. The parameters for the SetLicense call will be available from the User Account web page. Currently this is not yet implemented on the web site, but you can contact support and you will get the required code snippet by email.

Because all users will have access to all future library version form NuGet web site, the license parameters also contain information about the updates subscription expiration date. So if you will not have a valid subscription when a new version will be available, you will not be able to use it. This also means that when updates subscription is renewed, then new license parameters will need to be entered to the SetLicense call. If will not want to update to new version, then you will need to limit the version to the last version that you still have access to. If you will want to the new version before renewing the license, you will simply need to comment the SetLicense call and start the library in an evaluation mode.

So to summarize: the new licensing mechanism is much simpler to use and understand, the library requires only one dll for both evaluation and commercial version and therefore it can be distributed as a NuGet package. And this licensing mechanism is supported in .Net CORE 3.1. 

This also means that the .Net CORE version is not available with windows installer. It can be get only from NuGet.

With windows installer you also get samples projects and Users Reference help file. This is not available with NuGet. But there are now more standard ways to get them:

- Samples can get downloaded from GitHub - https://github.com/ab4d/Ab2d.ReaderSvg.Wpf.Samples

- Help is available online - https://www.ab4d.com/help/ReaderSvg/html/R_Project_Ab2d_ReaderSvg_Help.htm

 

Support for .Net CORE 3.1 is not the only new feature of this release. If you are using ReaderSvg to read large svg files, you will be happy to know that the new version got some significant performance optimizations – some svg files can be read a few times faster.

There is also an improved support for reading svg patterns – the new versions now support linked patterns (patterns that have xlink:href set to another pattern).

There are also a few other improvements and fixes. See a full list here: https://www.ab4d.com/ReaderSvg-history.aspx

 

Though most of the development time in the company is spent for 3D libraries, you can see that the 2D libraries are still fully supported and will continue to get new updates in the future. For example, in early 2020 I plan to update ZoomPanel control so that it will also support .Net CORE 3.1 version and be available with NuGet.

Tags:

ReaderSvg

Major update of Ab2d.ReaderSvg brings better support for css styles and more

by abenedik 6. November 2018 17:00

I am happy to inform you that a new major version of Ab2d.ReaderSvg was just published.

The new version has a significantly better support for reading css styles. The new version of the Ab2d.ReaderSvg can now correctly read a css text with multiple class name definitions in one line. Also adding additional properties to already defined class names is now supported. Those two features are required to correctly read the following css definition:

.A, .B { fill: green; } 

.A { stroke: green; }

This update should greatly improve reading css styles from svg files. But because css styles can be incredibly complex, there are still cases that are not supported. Luckily, the main tools that can save to svg files usually do not use such complex css styles and therefore Ab2d.ReaderSvg should be able to read almost all the files.

 

An important new feature is also that ReaderSvg class now has two new delegates: BeforeWpfObjectCreatedCallback and AfterWpfObjectCreatedCallback. The first delegate is called before ReaderSvg creates a WPF object from the svg element. The delegate gets the xml text that is used to define the element. It can be used to create your own WPF object from the xml and pass that back to ReaderSvg. The other delegate is called after the WPF object is created by ReaderSvg. It gets the created WPF object and the xml text. This delegate can be used to read some additional properties from the xml and decorate or change the already created WPF object.

There are also some other improvements and fixes. The whole list can be seen on ReaderSvg versions history web page.

 

This shows that though the main focus of the AB4D company is on developing components for 3D visualization, the 2D tools and importers are still fully supported - most of the updates are based on the great feedback from the customers. So, if you get a svg file that is not correctly imported or you have a good feature request, please send me the svg file or a feature request.

Tags:

ReaderSvg

New version of Ab2d.ReaderSvg library published

by abenedik 17. November 2017 21:15

I would like to inform you that I have just published a new version of Ab2d.ReaderSvg library.

Ab2d.ReaderSvg is the best and most accurate SVG importer library for .Net and can convert SVG elements into WPF objects.

The following is a list of improvements and changes in this version:

  • Added SourceStream property to SvgViewbox and SvgDrawing. This allows reading SVG file from stream (for example to bind memory stream from a database to a SvgViewbox)
  • Improved support for generic font families: serif, sans-serif, monospace, times.
  • Set InnerReaderSvg and NamedObjects properties on ReaderSvg object before SvgViewbox.SvgFileLoaded event is fired (in the previous version those two properties were set after the event was fired and therefore it was not possible to read InnerReaderSvg and NamedObjects in the SvgFileLoaded event handler).
  • Prevented setting RenderTransformOrigin from inkscape:transform-center-x and inkscape:transform-center-y attributes when there is also a transform attribute set. This fix prevents applying an invalid transformation.
  • Fixed reading alpha value when color is specified as "rgba(r,g,b,a)" value.
  • Prevented foreignData elements defined in SVG file that are not supported (for example metafiles) to "hide" other standard SVG elements.
  • Added UseOnlyInstalledFontFamilies property to ReaderSvg. That property can be set to true to prevent creating FontFamily objects with font names that are not installed on the system.

Tags:

ReaderSvg

New version of svg reader for .Net applications published

by abenedik 8. March 2016 21:34

I am happy to announced that a new version of Ab2d.ReaderSvg is available.

textPath svg element shown in ViewerSvg

As shown in the image above, the ReaderSvg now supports textPath svg element that positions text on a referenced path element.

Another very interesting new feature is a new GetElementSvgText method that returns the original svg text of the element specified with its name. This way it is possible to read data from svg file that are not recognized by ReaderSvg. The following image shows svg text for the selected element in ViewerSvg:

Showing svg text from selected element in ViewerSvg

There are also some other great new features and fixes:

  • Added support for vertical text (glyph-orientation-vertical svg property).
  • Improved support for rounder corners on rectangles in case when only rx or only ry is specified - in this case the other value is set to the same value.
  • Fixed reading text decorations (Underline and Strikethrough).
  • Added support for reading metafiles embedded into image's base64 encoded string.
  • Added support for reading images in foreignObject created in Microsoft Visio.
  • Added ReadForeignObjects property to Ab2d.ReaderSvg that enables or disables reading foreignObject elements (enabled by default).
  • Added support for reading data from number lists that end with comma - for example the following string in svg file was not read: "12, 34, 56,".
  • Improved writing images in XAML. They are now written in more clear format. Also fixed setting Source for images that are created from foreign objects.
  • Fixed writing new line characters in XAML.

 

As alwasy, the customers can get the latets version from their User Account page. Others can try the new version with downloading the evaluation version.

And if yuo find a svg file that is not read correctly, please send it to me and I will my best to improve ReaderSvg.

Tags:

ReaderSvg