There are some GUI tools for processing SVG - www.w3.org. My choice is https://inkscape.org/ and https://www.blender.org/download/.
Blender is not listed by W3C and Blender working slowly than inkscape, but working and has many additional future, for example Video Processing (this is my loved video editor) and also Blender can import GCode (inkscape can only export it).
Also there some another interesting GUI, distributed in .NET source code, for example SvgPad.
I don't know opensource freeware software to transform SVG to PDF. Any software I see was scam, it create PNG bitmap and pack it in PDF wrapper. Its not a vector image, it's only scam.
Therefore I use main SVG program to processing SVG-files as native PDF-format - https://inkscape.org/, therefore my main VB.NET pattern to eventually transformation SVG to PDF look as this code:
1: Module Inkscape
2: Public Sub SvgToPdf2(InputSvgFileName As String, OutPdfFileName As String, WorkingDirectory As String, InkscapePath As String)
4: Dim CmdUtil As New Process
5: CmdUtil.StartInfo.FileName = "" & InkscapePath & ""
6: CmdUtil.StartInfo.Arguments = "--without-gui --export-pdf "" & OutPdfFileName & "" " & "" & InputSvgFileName & ""
7: CmdUtil.StartInfo.WorkingDirectory = IO.Path.GetDirectoryName(WorkingDirectory)
8: CmdUtil.StartInfo.UseShellExecute = False
9: CmdUtil.StartInfo.RedirectStandardError = True
13: Catch ex As Exception
15: End Try
17: End Sub
18: End Module
There are three choice to processing SVG as XML
Below you can see my basic function for parse SVG files.
1: Imports HtmlAgilityPack
2: Imports System.Linq
4: Partial Public Class XMLParser_HtmlAgilityPack
6: Dim SVG As HtmlDocument
8: Public Sub New(SvgFileName As String)
9: SVG = New HtmlDocument()
11: End Sub
13: Public Function GetTextNode(TextNodeName As String) As HtmlNode
14: Return SVG.DocumentNode.SelectNodes("//text[@id='" & TextNodeName & "']").First
15: End Function
17: Public Function GetSpanNode(SpanNodeName As String) As HtmlNode
18: Return SVG.DocumentNode.SelectNodes("//tspan[@id='" & SpanNodeName & "']").First
19: End Function
21: Public Sub SetSpanNode(SpanNodeName As String, Value As String)
22: SVG.DocumentNode.SelectNodes("//tspan[@id='" & SpanNodeName & "']").First.InnerHtml = Value
23: End Sub
25: Public Sub ReplaceSpanText(SpanNodeName As String, OldTxt As String, NewTxt As String)
26: SetSpanNode(SpanNodeName, Replace(GetSpanNode(SpanNodeName).InnerText, OldTxt, NewTxt))
27: End Sub
29: Public Sub Save(FileName As String)
31: End Sub
33: End Class
And real project usually contains thousands of similar line of code.
This interesting project SVG-GDI+ bridge contains definition of all GDI+ class function and with this bridge we can write directly to SVG. This project was write in 2003 year and use ancient ActiveX component ASV3Sharp. I have no interest to rise again that component, but directly writing to SVG surface from VB.NET is cool.
Basic package to transform SVG to bitmap is SVG.NET, vvvv/SVG. This package contains full source code and viewer.
There are many another samples of using this library, for example this project, for example lasitha.blog
|<SITEMAP> <MVC> <ASP> <NET> <DATA> <KIOSK> <FLEX> <SQL> <NOTES> <LINUX> <MONO> <FREEWARE> <DOCS> <ENG> <CHAT ME> <ABOUT ME> < THANKS ME>|