Error processing SSI file
LEADTOOLS Svg (Leadtools.Svg assembly)

Show in webframe

Version Property






Gets or sets the SVG version of the document.
Syntax
public SvgVersion Version {get; set;}
'Declaration
 
Public Property Version As SvgVersion
'Usage
 
Dim instance As SvgDocument
Dim value As SvgVersion
 
instance.Version = value
 
value = instance.Version
@property (nonatomic, assign) LTSvgVersion version
public SvgVersion getVersion()
public void setVersion(SvgVersion version)
            
public:
property SvgVersion Version {
   SvgVersion get();
   void set (    SvgVersion value);
}

Property Value

The SVG version of the document
Remarks

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.

Example

This example will convert an SVG file from version any version to 1.1

Copy Code  
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.Drawing
Imports Leadtools.Forms.DocumentWriters
Imports Leadtools.Svg

Public Shared Sub SvgVersionExample()
   ' Assume the SVG file is located here
   Dim 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 file
   Using document As SvgDocument = SvgDocument.LoadFromFile(srcFileName, Nothing)
      ' Show the version
      Console.WriteLine("Original version is: " + document.Version.ToString())
      If document.Version <> SvgVersion.v11 Then
         ' Convert it
         document.Version = SvgVersion.v11
      End If

      ' Save it
      document.SaveToFile(dstFileName, Nothing)
   End Using

   ' Check it
   Using document As SvgDocument = SvgDocument.LoadFromFile(dstFileName, Nothing)
      Console.WriteLine("New version is: " + document.Version.ToString())
   End Using
End 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 here
   string srcFileName = Path.Combine(ImagesPath.Path, "Page1.svg");
   string dstFileName = Path.Combine(ImagesPath.Path, "Page1Version11.svg");
   // Load the SVG from file
   using (SvgDocument document = SvgDocument.LoadFromFile(srcFileName, null))
   {
      // Show the version
      Console.WriteLine("Original version is: " + document.Version);
      if (document.Version != SvgVersion.v11)
      {
         // Convert it
         document.Version = SvgVersion.v11;
      }

      // Save it
      document.SaveToFile(dstFileName, null);
   }

   // Check it
   using (SvgDocument document = SvgDocument.LoadFromFile(dstFileName, null))
   {
      Console.WriteLine("New version is: " + document.Version);
   }
}
Requirements

Target Platforms

See Also

Reference

SvgDocument Class
SvgDocument Members

Error processing SSI file
  Leadtools.Svg requires a Document or Medical toolkit license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features