Load a vector image (SVG) for conversion in C#

SVG

To load and convert an SVG image from your local storage to a different file type, use the LoadFromFile method from the GdPictureDocumentConverter class. This method requires the following parameters:

  • FilePath — The path to an SVG image to convert.
  • DocumentFormat — The file format represented as a member of the DocumentFormat enumeration.

To load and convert an SVG image from your local storage, use the following code:

using GdPictureDocumentConverter gdpictureDocumentConverter = new GdPictureDocumentConverter();
// Specify the file format.
GdPicture14.DocumentFormat format = GdPicture14.DocumentFormat.DocumentFormatSVG;
// Load an SVG image from a file.
gdpictureDocumentConverter.LoadFromFile(@"C:\temp\source.svg", format);
gdpictureDocumentConverter.SaveAsPDF(@"C:\temp\output.pdf");