0

コマンドラインからconverting PDF to JPG使用するためのWebアプリケーションをC#で作成しました。ImageMagick

これはローカルでは正常に機能しますが、サーバーにアップロードしたときに機能しませんでした。

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

4

1 に答える 1

0
Imagemagick requires you to install ghostscript.

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

これで、どのシステムでも正常に動作します。

于 2012-07-25T12:37:14.863 に答える