Gets or sets the SVG version of the document.
public Leadtools.Svg.SvgVersion Version {get; set;}Public Property Version As Leadtools.Svg.SvgVersion@property (nonatomic, assign) LTSvgVersion versionpublic SvgVersion getVersion()public void setVersion(SvgVersion version)
public:property Leadtools.Svg.SvgVersion Version {Leadtools.Svg.SvgVersion get();void set ( Leadtools.Svg.SvgVersion );}
The SVG version of the document
The initial version of Version depends on the original data and read from the SVG data directly.
Setting the value to a different value will be used when saving the document using SaveToFile or to SaveToStream.
This example will convert an SVG file from version any version to 1.1
Imports LeadtoolsImports Leadtools.CodecsImports Leadtools.DrawingImports Leadtools.Forms.DocumentWritersImports Leadtools.SvgPublic Shared Sub SvgVersionExample()' Assume the SVG file is located hereDim srcFileName As String = Path.Combine(Common.ImagesPath.Path, "Page1.svg")Dim dstFileName As String = Path.Combine(Common.ImagesPath.Path, "Page1Version11.svg")' Load the SVG from fileUsing document As SvgDocument = SvgDocument.LoadFromFile(srcFileName, Nothing)' Show the versionConsole.WriteLine("Original version is: " + document.Version.ToString())If document.Version <> SvgVersion.v11 Then' Convert itdocument.Version = SvgVersion.v11End If' Save itdocument.SaveToFile(dstFileName, Nothing)End Using' Check itUsing document As SvgDocument = SvgDocument.LoadFromFile(dstFileName, Nothing)Console.WriteLine("New version is: " + document.Version.ToString())End UsingEnd Sub
using Leadtools;using Leadtools.Codecs;using Leadtools.Drawing;using Leadtools.Forms.DocumentWriters;using Leadtools.Svg;public void SvgVersionExample(){// Assume the SVG file is located herestring srcFileName = Path.Combine(ImagesPath.Path, "Page1.svg");string dstFileName = Path.Combine(ImagesPath.Path, "Page1Version11.svg");// Load the SVG from fileusing (SvgDocument document = SvgDocument.LoadFromFile(srcFileName, null)){// Show the versionConsole.WriteLine("Original version is: " + document.Version);if (document.Version != SvgVersion.v11){// Convert itdocument.Version = SvgVersion.v11;}// Save itdocument.SaveToFile(dstFileName, null);}// Check itusing (SvgDocument document = SvgDocument.LoadFromFile(dstFileName, null)){Console.WriteLine("New version is: " + document.Version);}}
|
Products |
Support |
Feedback: Version Property - Leadtools.Svg |
Introduction |
Help Version 19.0.2017.3.21
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.