we will convert jpg to ai like the example link:
https://products.groupdocs.com/conversion/net/jpg-to-ai/
the code “converter.GetPossibleConversions()[“ai”].ConvertOptions” has exception:“Object reference not set to an instance of an object.”,
I found that reason is” converter.GetPossibleConversions()[“ai”]" return null ,
please help me ,thank you.
Code:
// Load JPG file
var converter = new GroupDocs.Conversion.Converter("input.jpg");
// Set conversion parameters for AI format
var convertOptions = converter.GetPossibleConversions()["ai"].ConvertOptions;
// Convert to AI format
converter.Convert("output.ai", convertOptions);