The conversion works fine now and this is the function I used to do the conversion action and at the same time it returns to me the new name of the converted image
private string convertPdf(string file)
private string convertPdf(string file)
{
string newPathImage = "";
MagickImageCollection collection = new MagickImageCollection();
MagickReadSettings settings = new MagickReadSettings();
settings.Density = new MagickGeometry(144, 144);
collection.Read(file, settings);
int id = 0;
foreach (MagickImage image in collection)
{
image.Write(file+ "img" + id + ".png");
newPathImage = image.ToString();
id++;
}
return newPathImage;
}
the problem when I want to open newPathImage in other action , an error occur "can not open the file "imagepdf.pdfimg0.png"