am very sorry... i think it is random problem... i checked it now... but it is working fine...
Stackoverflow exception :
Stackoverflow exception :
string inputFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "agreement.pdf");
string outputFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "img-output\\");
using (MagickImageCollection collection = new MagickImageCollection())
{
collection.Read(inputFile); // here the problem occrured...
int id = 1;
foreach (MagickImage image in collection)
{
image.Write(outputFile + "img" + id + ".png");
id++;
}
}