2012-07-25 75 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. 

現在,它適用於任何系統上的罰款。

相關問題