---
title: "SvgReaderSettings Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_SvgReaderSettings.htm
product: "Graphics Mill"
---

# SvgReaderSettings Class
 
Contains the settings used to read an SVG file with [SvgReader](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_SvgReader.htm.md).
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public sealed class SvgReaderSettings
```
 
## Remarks
 Pass an instance of this class to the [SvgReader(String, SvgReaderSettings)](https://www.graphicsmill.com/docs/gm/C_Aurigma_GraphicsMill_Codecs_SvgReader_ctor_2_afa45dc1.htm.md) or [SvgReader(Stream, SvgReaderSettings)](https://www.graphicsmill.com/docs/gm/C_Aurigma_GraphicsMill_Codecs_SvgReader_ctor_2_d7d18a76.htm.md) constructor. The reader copies the settings, so you can reuse one instance for several readers.
 
## Examples
  
```csharp
const string assetsPrefix = "assets/";
const string assetsFolder = @"Images";

var settings = new SvgReaderSettings();

// The SVG file refers to images in the "assets" folder, which is stored somewhere else.
settings.ResolveImage = args =>
{
    if (args.Href.StartsWith(assetsPrefix, StringComparison.OrdinalIgnoreCase))
    {
        var fileName = System.IO.Path.Combine(assetsFolder, args.Href.Substring(assetsPrefix.Length));

        // The reader takes the image when the property is set, so you can dispose the bitmap right away.
        using (var bitmap = new Bitmap(fileName))
        {
            args.Image = bitmap;
        }
    }

    // If you set neither Image nor GraphicsContainer, the image is loaded from the folder of the SVG file.
};

using (var reader = new SvgReader(@"Images\SvgWithImage.svg", settings))
using (var writer = ImageWriter.Create(@"Images\Output\SvgWithImage.png"))
{
    Pipeline.Run(reader + writer);
}
```
 
## Inheritance Hierarchy
  
- System.Object
    - Aurigma.GraphicsMill.Codecs.SvgReaderSettings
   
## See Also

### Reference

- [SvgReaderSettings Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Codecs_SvgReaderSettings.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)
