C# – how to use imageMagick with C#

cimageimagemagickpdf

Could you explain how I can use ImageMagick with C# . I am trying to convert PDF to pages into images.

I want to run imageMagick command "convert -density 300 $input.pdf $output.png"

Best Answer

string arguments = string.Format(@"-density 300 {0}.pdf {1}.png", intputFileName, outputFileName");
var startInfo = new ProcessStartInfo {
    Arguments = arguments,
    Filename = @"C:\path\to\imagick\convert.exe"
};
Process.Start(startInfo).WaitForExit();

References: