私はプログラミング作業をしています。どこで私は無料のライブラリやコマンドラインのプログラムを使用してPDFファイルをC#で画像に変換する必要があります。c#とGhostscriptを使ってpdfをイメージに変換する
これまでのところ、Ghostscriptを使用して変換すると、それが画像の中央に8赤いボックスを作成することを除いて動作します:PDFの内容は唯一の純粋な白ですが、なぜ私は8を持っているん
をイメージの赤いボックス?私は何を間違えたのですか?ここで
コードです:ありがとう、ここ
string outputImagesPath = null;
string inputPDFFile = null;
inputPDFFile = @"C:\Users\user\cover.pdf";
outputImagesPath = @"C:\user\Desktop\1.jpg";
string ghostScriptPath = @"C:\Users\gswin32.exe";
String ars = "-o" + outputImagesPath+ "%03d.png -sDEVICE=jpeg -dJPEGQ=100 " + inputPDFFile;
Process proc = new Process();
proc.StartInfo.FileName = ghostScriptPath;
proc.StartInfo.Arguments = ars;
proc.StartInfo.CreateNoWindow = true;
//proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.Start();
string strOutput = proc.StandardOutput.ReadToEnd();
Console.WriteLine(strOutput);
proc.WaitForExit();
は、PDFのリンクですhttps://drive.google.com/open?id=0B0auNx4EZsCUUkFHWGR4MjV5NzA
あなたのエラーは、ここでは+ + outputImagesPath + "%03d.png'だと思いますが、' + outputImagesPath + "%d.jpeg'ですか? – lokusking