Converting svg to pdf error

4.zip (27.6 KB)

Aspose.Pdf.SvgLoadOptions loadSvg = new Aspose.Pdf.SvgLoadOptions();

Aspose.Pdf.Document doc = new Aspose.Pdf.Document("4.svg", loadSvg);
doc.Save("4.pdf");//System.NullReferenceException:“Object reference not set to an instance of an object.”

this svg can not convert to pdf ,In theory, all your products are related to this svg will throw error
this svg render ok in chrome edge
my env: aspose.pdf 23.1

@lsl,

It seems to be the same issue as in the other post. Probably a faulty installation in your system.

I tried the following code and worked fine:

private void Logic()
{
    Document doc = new Document($"{PartialPath}_input.svg", new SvgLoadOptions());

   doc.Save($"{PartialPath}_output.pdf");
}

ConvertionFromSvgError_input_svg.zip (27.7 KB)
ConvertionFromSvgError_output.pdf (440.3 KB)