0
我已经通过命令行使用ImageMagick
在c#中创建了一个web应用程序converting PDF to JPG
。ImageMagick不能在Windows服务器上工作
这在当地正常工作,但是当我将它上载到服务器时,它无法正常工作。
public string appPath = "C:\\Program Files\\ImageMagick-6.5.3-Q16";
Process myProcess = new Process();
myProcess.StartInfo.FileName = appPath + @"\convert";
myProcess.StartInfo.Arguments = (@"-type truecolor -quality " + tbQuality.Text + " -colorspace " + cbColourSpace.SelectedValue.ToString().ToLower() + " -density " + tbDPI.Text + @" " + currentFile + resizeString + @" " + outputFile);
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
myProcess.WaitForExit();
这成功运行没有任何异常,但不产生任何JPG