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