2012-07-25 49 views
0

我已经通过命令行使用ImageMagick在c#中创建了一个web应用程序converting PDF to JPGImageMagick不能在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

回答

0
Imagemagick requires you to install ghostscript. 

It's required by ImageMagick to interpret Postscript and PDF. 

现在,它适用于任何系统上的罚款。

相关问题